From 0a2fb8db8fb0d573b3cf4727943ada8cabddbb99 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 8 Feb 2019 11:51:26 +0800 Subject: [PATCH] Remove localVarPrefix from Java client (#2045) * remove localVarPrefix from java client * rename local varaible * update samples --- docs/generators/groovy.md | 1 - docs/generators/java-inflector.md | 1 - docs/generators/java-msf4j.md | 1 - docs/generators/java-pkmst.md | 1 - docs/generators/java-play-framework.md | 1 - docs/generators/java-undertow-server.md | 1 - docs/generators/java-vertx.md | 1 - docs/generators/java.md | 1 - docs/generators/jaxrs-cxf-cdi.md | 1 - docs/generators/jaxrs-cxf-client.md | 1 - docs/generators/jaxrs-cxf.md | 1 - docs/generators/jaxrs-jersey.md | 1 - docs/generators/jaxrs-resteasy-eap.md | 1 - docs/generators/jaxrs-resteasy.md | 1 - docs/generators/jaxrs-spec.md | 1 - docs/generators/spring.md | 1 - .../languages/AbstractJavaCodegen.java | 5 - .../Java/libraries/okhttp-gson/api.mustache | 132 ++-- .../client/api/AnotherFakeApi.java | 64 +- .../org/openapitools/client/api/FakeApi.java | 738 +++++++++--------- .../client/api/FakeClassnameTags123Api.java | 64 +- .../org/openapitools/client/api/PetApi.java | 512 ++++++------ .../org/openapitools/client/api/StoreApi.java | 232 +++--- .../org/openapitools/client/api/UserApi.java | 442 +++++------ .../client/api/AnotherFakeApi.java | 64 +- .../org/openapitools/client/api/FakeApi.java | 738 +++++++++--------- .../client/api/FakeClassnameTags123Api.java | 64 +- .../org/openapitools/client/api/PetApi.java | 512 ++++++------ .../org/openapitools/client/api/StoreApi.java | 232 +++--- .../org/openapitools/client/api/UserApi.java | 442 +++++------ 30 files changed, 2118 insertions(+), 2139 deletions(-) diff --git a/docs/generators/groovy.md b/docs/generators/groovy.md index fa5e542697f..fdcc91016e8 100644 --- a/docs/generators/groovy.md +++ b/docs/generators/groovy.md @@ -29,7 +29,6 @@ sidebar_label: groovy |licenseName|The name of the license| |null| |licenseUrl|The URL of the license| |null| |sourceFolder|source folder for generated code| |null| -|localVariablePrefix|prefix for generated code members and local variables| |null| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| diff --git a/docs/generators/java-inflector.md b/docs/generators/java-inflector.md index e2b2fc439f2..e251e5152c5 100644 --- a/docs/generators/java-inflector.md +++ b/docs/generators/java-inflector.md @@ -29,7 +29,6 @@ sidebar_label: java-inflector |licenseName|The name of the license| |null| |licenseUrl|The URL of the license| |null| |sourceFolder|source folder for generated code| |null| -|localVariablePrefix|prefix for generated code members and local variables| |null| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| diff --git a/docs/generators/java-msf4j.md b/docs/generators/java-msf4j.md index 899e7c7e7e7..781d29e6b9e 100644 --- a/docs/generators/java-msf4j.md +++ b/docs/generators/java-msf4j.md @@ -29,7 +29,6 @@ sidebar_label: java-msf4j |licenseName|The name of the license| |null| |licenseUrl|The URL of the license| |null| |sourceFolder|source folder for generated code| |null| -|localVariablePrefix|prefix for generated code members and local variables| |null| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| diff --git a/docs/generators/java-pkmst.md b/docs/generators/java-pkmst.md index baefba28819..63933b001f3 100644 --- a/docs/generators/java-pkmst.md +++ b/docs/generators/java-pkmst.md @@ -29,7 +29,6 @@ sidebar_label: java-pkmst |licenseName|The name of the license| |null| |licenseUrl|The URL of the license| |null| |sourceFolder|source folder for generated code| |null| -|localVariablePrefix|prefix for generated code members and local variables| |null| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| diff --git a/docs/generators/java-play-framework.md b/docs/generators/java-play-framework.md index 444c85a52a3..16040d07eda 100644 --- a/docs/generators/java-play-framework.md +++ b/docs/generators/java-play-framework.md @@ -29,7 +29,6 @@ sidebar_label: java-play-framework |licenseName|The name of the license| |null| |licenseUrl|The URL of the license| |null| |sourceFolder|source folder for generated code| |null| -|localVariablePrefix|prefix for generated code members and local variables| |null| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| diff --git a/docs/generators/java-undertow-server.md b/docs/generators/java-undertow-server.md index 0f9ce1d7772..50ac3cdec42 100644 --- a/docs/generators/java-undertow-server.md +++ b/docs/generators/java-undertow-server.md @@ -29,7 +29,6 @@ sidebar_label: java-undertow-server |licenseName|The name of the license| |null| |licenseUrl|The URL of the license| |null| |sourceFolder|source folder for generated code| |null| -|localVariablePrefix|prefix for generated code members and local variables| |null| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| diff --git a/docs/generators/java-vertx.md b/docs/generators/java-vertx.md index a2e56703018..c673118dc61 100644 --- a/docs/generators/java-vertx.md +++ b/docs/generators/java-vertx.md @@ -29,7 +29,6 @@ sidebar_label: java-vertx |licenseName|The name of the license| |null| |licenseUrl|The URL of the license| |null| |sourceFolder|source folder for generated code| |null| -|localVariablePrefix|prefix for generated code members and local variables| |null| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| diff --git a/docs/generators/java.md b/docs/generators/java.md index 34f3f29b363..6a9e3f790a8 100644 --- a/docs/generators/java.md +++ b/docs/generators/java.md @@ -29,7 +29,6 @@ sidebar_label: java |licenseName|The name of the license| |null| |licenseUrl|The URL of the license| |null| |sourceFolder|source folder for generated code| |null| -|localVariablePrefix|prefix for generated code members and local variables| |null| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| diff --git a/docs/generators/jaxrs-cxf-cdi.md b/docs/generators/jaxrs-cxf-cdi.md index aaab6233b0f..6a1d1254a34 100644 --- a/docs/generators/jaxrs-cxf-cdi.md +++ b/docs/generators/jaxrs-cxf-cdi.md @@ -29,7 +29,6 @@ sidebar_label: jaxrs-cxf-cdi |licenseName|The name of the license| |null| |licenseUrl|The URL of the license| |null| |sourceFolder|source folder for generated code| |null| -|localVariablePrefix|prefix for generated code members and local variables| |null| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| diff --git a/docs/generators/jaxrs-cxf-client.md b/docs/generators/jaxrs-cxf-client.md index 53309c560f8..cacf2a06d3f 100644 --- a/docs/generators/jaxrs-cxf-client.md +++ b/docs/generators/jaxrs-cxf-client.md @@ -29,7 +29,6 @@ sidebar_label: jaxrs-cxf-client |licenseName|The name of the license| |null| |licenseUrl|The URL of the license| |null| |sourceFolder|source folder for generated code| |null| -|localVariablePrefix|prefix for generated code members and local variables| |null| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| diff --git a/docs/generators/jaxrs-cxf.md b/docs/generators/jaxrs-cxf.md index 93ce3dfb310..ec847e1ee57 100644 --- a/docs/generators/jaxrs-cxf.md +++ b/docs/generators/jaxrs-cxf.md @@ -29,7 +29,6 @@ sidebar_label: jaxrs-cxf |licenseName|The name of the license| |null| |licenseUrl|The URL of the license| |null| |sourceFolder|source folder for generated code| |null| -|localVariablePrefix|prefix for generated code members and local variables| |null| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| diff --git a/docs/generators/jaxrs-jersey.md b/docs/generators/jaxrs-jersey.md index b9a44df0ecc..38a8428b18f 100644 --- a/docs/generators/jaxrs-jersey.md +++ b/docs/generators/jaxrs-jersey.md @@ -29,7 +29,6 @@ sidebar_label: jaxrs-jersey |licenseName|The name of the license| |null| |licenseUrl|The URL of the license| |null| |sourceFolder|source folder for generated code| |null| -|localVariablePrefix|prefix for generated code members and local variables| |null| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| diff --git a/docs/generators/jaxrs-resteasy-eap.md b/docs/generators/jaxrs-resteasy-eap.md index 03275a94975..da8f9383644 100644 --- a/docs/generators/jaxrs-resteasy-eap.md +++ b/docs/generators/jaxrs-resteasy-eap.md @@ -29,7 +29,6 @@ sidebar_label: jaxrs-resteasy-eap |licenseName|The name of the license| |null| |licenseUrl|The URL of the license| |null| |sourceFolder|source folder for generated code| |null| -|localVariablePrefix|prefix for generated code members and local variables| |null| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| diff --git a/docs/generators/jaxrs-resteasy.md b/docs/generators/jaxrs-resteasy.md index ae148d03a22..103d4b887a6 100644 --- a/docs/generators/jaxrs-resteasy.md +++ b/docs/generators/jaxrs-resteasy.md @@ -29,7 +29,6 @@ sidebar_label: jaxrs-resteasy |licenseName|The name of the license| |null| |licenseUrl|The URL of the license| |null| |sourceFolder|source folder for generated code| |null| -|localVariablePrefix|prefix for generated code members and local variables| |null| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| diff --git a/docs/generators/jaxrs-spec.md b/docs/generators/jaxrs-spec.md index e421039fc8e..d816eac36ca 100644 --- a/docs/generators/jaxrs-spec.md +++ b/docs/generators/jaxrs-spec.md @@ -29,7 +29,6 @@ sidebar_label: jaxrs-spec |licenseName|The name of the license| |null| |licenseUrl|The URL of the license| |null| |sourceFolder|source folder for generated code| |null| -|localVariablePrefix|prefix for generated code members and local variables| |null| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| diff --git a/docs/generators/spring.md b/docs/generators/spring.md index f7a3fe37a30..87efe3cbe25 100644 --- a/docs/generators/spring.md +++ b/docs/generators/spring.md @@ -29,7 +29,6 @@ sidebar_label: spring |licenseName|The name of the license| |null| |licenseUrl|The URL of the license| |null| |sourceFolder|source folder for generated code| |null| -|localVariablePrefix|prefix for generated code members and local variables| |null| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| |bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java index 76e57413aad..82542f0ca95 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java @@ -161,7 +161,6 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code cliOptions.add(new CliOption(CodegenConstants.LICENSE_NAME, CodegenConstants.LICENSE_NAME_DESC)); cliOptions.add(new CliOption(CodegenConstants.LICENSE_URL, CodegenConstants.LICENSE_URL_DESC)); cliOptions.add(new CliOption(CodegenConstants.SOURCE_FOLDER, CodegenConstants.SOURCE_FOLDER_DESC)); - cliOptions.add(new CliOption(CodegenConstants.LOCAL_VARIABLE_PREFIX, CodegenConstants.LOCAL_VARIABLE_PREFIX_DESC)); cliOptions.add(CliOption.newBoolean(CodegenConstants.SERIALIZABLE_MODEL, CodegenConstants.SERIALIZABLE_MODEL_DESC)); cliOptions.add(CliOption.newBoolean(CodegenConstants.SERIALIZE_BIG_DECIMAL_AS_STRING, CodegenConstants .SERIALIZE_BIG_DECIMAL_AS_STRING_DESC)); @@ -341,10 +340,6 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code } additionalProperties.put(CodegenConstants.SOURCE_FOLDER, sourceFolder); - if (additionalProperties.containsKey(CodegenConstants.LOCAL_VARIABLE_PREFIX)) { - this.setLocalVariablePrefix((String) additionalProperties.get(CodegenConstants.LOCAL_VARIABLE_PREFIX)); - } - if (additionalProperties.containsKey(CodegenConstants.SERIALIZABLE_MODEL)) { this.setSerializableModel(Boolean.valueOf(additionalProperties.get(CodegenConstants.SERIALIZABLE_MODEL).toString())); } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache index 3f60a15b45f..6e2c3714c0e 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache @@ -44,30 +44,30 @@ import java.util.Map; {{#operations}} public class {{classname}} { - private ApiClient {{localVariablePrefix}}apiClient; + private ApiClient localVarApiClient; public {{classname}}() { this(Configuration.getDefaultApiClient()); } public {{classname}}(ApiClient apiClient) { - this.{{localVariablePrefix}}apiClient = apiClient; + this.localVarApiClient = apiClient; } public ApiClient getApiClient() { - return {{localVariablePrefix}}apiClient; + return localVarApiClient; } public void setApiClient(ApiClient apiClient) { - this.{{localVariablePrefix}}apiClient = apiClient; + this.localVarApiClient = apiClient; } {{#operation}} {{^vendorExtensions.x-group-parameters}}/** * Build call for {{operationId}}{{#allParams}} * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}){{/required}}{{/allParams}} - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener + * @param _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object {{#isDeprecated}} @@ -81,70 +81,70 @@ public class {{classname}} { {{#isDeprecated}} @Deprecated {{/isDeprecated}} - public{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}private{{/vendorExtensions.x-group-parameters}} okhttp3.Call {{operationId}}Call({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object {{localVariablePrefix}}localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}new Object(){{/bodyParam}}; + public{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}private{{/vendorExtensions.x-group-parameters}} okhttp3.Call {{operationId}}Call({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { + Object localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}new Object(){{/bodyParam}}; // create path and map variables - String {{localVariablePrefix}}localVarPath = "{{{path}}}"{{#pathParams}} - .replaceAll("\\{" + "{{baseName}}" + "\\}", {{localVariablePrefix}}apiClient.escapeString({{{paramName}}}.toString())){{/pathParams}}; + String localVarPath = "{{{path}}}"{{#pathParams}} + .replaceAll("\\{" + "{{baseName}}" + "\\}", localVarApiClient.escapeString({{{paramName}}}.toString())){{/pathParams}}; - {{javaUtilPrefix}}List {{localVariablePrefix}}localVarQueryParams = new {{javaUtilPrefix}}ArrayList(); - {{javaUtilPrefix}}List {{localVariablePrefix}}localVarCollectionQueryParams = new {{javaUtilPrefix}}ArrayList(); + {{javaUtilPrefix}}List localVarQueryParams = new {{javaUtilPrefix}}ArrayList(); + {{javaUtilPrefix}}List localVarCollectionQueryParams = new {{javaUtilPrefix}}ArrayList(); {{#queryParams}} if ({{paramName}} != null) { - {{localVariablePrefix}}{{#collectionFormat}}localVarCollectionQueryParams.addAll({{localVariablePrefix}}apiClient.parameterToPairs("{{{collectionFormat}}}", {{/collectionFormat}}{{^collectionFormat}}localVarQueryParams.addAll({{localVariablePrefix}}apiClient.parameterToPair({{/collectionFormat}}"{{baseName}}", {{paramName}})); + {{#collectionFormat}}localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("{{{collectionFormat}}}", {{/collectionFormat}}{{^collectionFormat}}localVarQueryParams.addAll(localVarApiClient.parameterToPair({{/collectionFormat}}"{{baseName}}", {{paramName}})); } {{/queryParams}} - {{javaUtilPrefix}}Map {{localVariablePrefix}}localVarHeaderParams = new {{javaUtilPrefix}}HashMap(); + {{javaUtilPrefix}}Map localVarHeaderParams = new {{javaUtilPrefix}}HashMap(); {{#headerParams}} if ({{paramName}} != null) { - {{localVariablePrefix}}localVarHeaderParams.put("{{baseName}}", {{localVariablePrefix}}apiClient.parameterToString({{paramName}})); + localVarHeaderParams.put("{{baseName}}", localVarApiClient.parameterToString({{paramName}})); } {{/headerParams}} - {{javaUtilPrefix}}Map {{localVariablePrefix}}localVarFormParams = new {{javaUtilPrefix}}HashMap(); + {{javaUtilPrefix}}Map localVarFormParams = new {{javaUtilPrefix}}HashMap(); {{#formParams}} if ({{paramName}} != null) { - {{localVariablePrefix}}localVarFormParams.put("{{baseName}}", {{paramName}}); + localVarFormParams.put("{{baseName}}", {{paramName}}); } {{/formParams}} - final String[] {{localVariablePrefix}}localVarAccepts = { + final String[] localVarAccepts = { {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }; - final String {{localVariablePrefix}}localVarAccept = {{localVariablePrefix}}apiClient.selectHeaderAccept({{localVariablePrefix}}localVarAccepts); - if ({{localVariablePrefix}}localVarAccept != null) { - {{localVariablePrefix}}localVarHeaderParams.put("Accept", {{localVariablePrefix}}localVarAccept); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); } - final String[] {{localVariablePrefix}}localVarContentTypes = { + final String[] localVarContentTypes = { {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }; - final String {{localVariablePrefix}}localVarContentType = {{localVariablePrefix}}apiClient.selectHeaderContentType({{localVariablePrefix}}localVarContentTypes); - {{localVariablePrefix}}localVarHeaderParams.put("Content-Type", {{localVariablePrefix}}localVarContentType); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } - String[] {{localVariablePrefix}}localVarAuthNames = new String[] { {{#authMethods}}"{{name}}"{{#hasMore}}, {{/hasMore}}{{/authMethods}} }; - return {{localVariablePrefix}}apiClient.buildCall({{localVariablePrefix}}localVarPath, "{{httpMethod}}", {{localVariablePrefix}}localVarQueryParams, {{localVariablePrefix}}localVarCollectionQueryParams, {{localVariablePrefix}}localVarPostBody, {{localVariablePrefix}}localVarHeaderParams, {{localVariablePrefix}}localVarFormParams, {{localVariablePrefix}}localVarAuthNames, progressRequestListener); + String[] localVarAuthNames = new String[] { {{#authMethods}}"{{name}}"{{#hasMore}}, {{/hasMore}}{{/authMethods}} }; + return localVarApiClient.buildCall(localVarPath, "{{httpMethod}}", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } {{#isDeprecated}} @Deprecated {{/isDeprecated}} @SuppressWarnings("rawtypes") - private okhttp3.Call {{operationId}}ValidateBeforeCall({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private okhttp3.Call {{operationId}}ValidateBeforeCall({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { {{^performBeanValidation}} {{#allParams}}{{#required}} // verify the required parameter '{{paramName}}' is set @@ -153,8 +153,8 @@ public class {{classname}} { } {{/required}}{{/allParams}} - okhttp3.Call {{localVariablePrefix}}call = {{operationId}}Call({{#allParams}}{{paramName}}, {{/allParams}}progressListener, progressRequestListener); - return {{localVariablePrefix}}call; + okhttp3.Call localVarCall = {{operationId}}Call({{#allParams}}{{paramName}}, {{/allParams}}_progressListener, _progressRequestListener); + return localVarCall; {{/performBeanValidation}} {{#performBeanValidation}} @@ -168,8 +168,8 @@ public class {{classname}} { parameterValues); if (violations.size() == 0) { - okhttp3.Call {{localVariablePrefix}}call = {{operationId}}Call({{#allParams}}{{paramName}}, {{/allParams}}progressListener, progressRequestListener); - return {{localVariablePrefix}}call; + okhttp3.Call localVarCall = {{operationId}}Call({{#allParams}}{{paramName}}, {{/allParams}}_progressListener, _progressRequestListener); + return localVarCall; } else { throw new BeanValidationException((Set) violations); @@ -204,8 +204,8 @@ public class {{classname}} { @Deprecated {{/isDeprecated}} public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException { - {{#returnType}}ApiResponse<{{{returnType}}}> {{localVariablePrefix}}resp = {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}} - return {{localVariablePrefix}}resp.getData();{{/returnType}} + {{#returnType}}ApiResponse<{{{returnType}}}> localVarResp = {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}} + return localVarResp.getData();{{/returnType}} } {{/vendorExtensions.x-group-parameters}} @@ -227,16 +227,16 @@ public class {{classname}} { @Deprecated {{/isDeprecated}} public{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}private{{/vendorExtensions.x-group-parameters}} ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException { - okhttp3.Call {{localVariablePrefix}}call = {{operationId}}ValidateBeforeCall({{#allParams}}{{paramName}}, {{/allParams}}null, null); - {{#returnType}}Type {{localVariablePrefix}}localVarReturnType = new TypeToken<{{{returnType}}}>(){}.getType(); - return {{localVariablePrefix}}apiClient.execute({{localVariablePrefix}}call, {{localVariablePrefix}}localVarReturnType);{{/returnType}}{{^returnType}}return {{localVariablePrefix}}apiClient.execute({{localVariablePrefix}}call);{{/returnType}} + okhttp3.Call localVarCall = {{operationId}}ValidateBeforeCall({{#allParams}}{{paramName}}, {{/allParams}}null, null); + {{#returnType}}Type localVarReturnType = new TypeToken<{{{returnType}}}>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType);{{/returnType}}{{^returnType}}return localVarApiClient.execute(localVarCall);{{/returnType}} } {{^vendorExtensions.x-group-parameters}}/** * {{summary}} (asynchronously) * {{notes}}{{#allParams}} * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}){{/required}}{{/allParams}} - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object {{#isDeprecated}} @@ -250,45 +250,45 @@ public class {{classname}} { {{#isDeprecated}} @Deprecated {{/isDeprecated}} - public{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}private{{/vendorExtensions.x-group-parameters}} okhttp3.Call {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}final ApiCallback<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{localVariablePrefix}}callback) throws ApiException { + public{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}private{{/vendorExtensions.x-group-parameters}} okhttp3.Call {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}final ApiCallback<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call {{localVariablePrefix}}call = {{operationId}}ValidateBeforeCall({{#allParams}}{{paramName}}, {{/allParams}}progressListener, progressRequestListener); - {{#returnType}}Type {{localVariablePrefix}}localVarReturnType = new TypeToken<{{{returnType}}}>(){}.getType(); - {{localVariablePrefix}}apiClient.executeAsync({{localVariablePrefix}}call, {{localVariablePrefix}}localVarReturnType, {{localVariablePrefix}}callback);{{/returnType}}{{^returnType}}{{localVariablePrefix}}apiClient.executeAsync({{localVariablePrefix}}call, {{localVariablePrefix}}callback);{{/returnType}} - return {{localVariablePrefix}}call; + okhttp3.Call localVarCall = {{operationId}}ValidateBeforeCall({{#allParams}}{{paramName}}, {{/allParams}}_progressListener, _progressRequestListener); + {{#returnType}}Type localVarReturnType = new TypeToken<{{{returnType}}}>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);{{/returnType}}{{^returnType}}localVarApiClient.executeAsync(localVarCall, _callback);{{/returnType}} + return localVarCall; } {{#vendorExtensions.x-group-parameters}} public class API{{operationId}}Request { {{#requiredParams}} - private final {{{dataType}}} {{localVariablePrefix}}{{paramName}}; + private final {{{dataType}}} {{paramName}}; {{/requiredParams}} {{#optionalParams}} - private {{{dataType}}} {{localVariablePrefix}}{{paramName}}; + private {{{dataType}}} {{paramName}}; {{/optionalParams}} private API{{operationId}}Request({{#requiredParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/requiredParams}}) { {{#requiredParams}} - this.{{localVariablePrefix}}{{paramName}} = {{paramName}}; + this.{{paramName}} = {{paramName}}; {{/requiredParams}} } @@ -299,15 +299,15 @@ public class {{classname}} { * @return API{{operationId}}Request */ public API{{operationId}}Request {{paramName}}({{{dataType}}} {{paramName}}) { - this.{{localVariablePrefix}}{{paramName}} = {{paramName}}; + this.{{paramName}} = {{paramName}}; return this; } {{/optionalParams}} /** * Build call for {{operationId}} - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener + * @param _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object {{#isDeprecated}} @@ -317,8 +317,8 @@ public class {{classname}} { {{#isDeprecated}} @Deprecated {{/isDeprecated}} - public okhttp3.Call buildCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - return {{operationId}}Call({{#allParams}}{{localVariablePrefix}}{{paramName}}, {{/allParams}}progressListener, progressRequestListener); + public okhttp3.Call buildCall(final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { + return {{operationId}}Call({{#allParams}}{{paramName}}, {{/allParams}}_progressListener, _progressRequestListener); } /** @@ -333,8 +333,8 @@ public class {{classname}} { @Deprecated {{/isDeprecated}} public {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} execute() throws ApiException { - {{#returnType}}ApiResponse<{{{returnType}}}> {{localVariablePrefix}}resp = {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}} - return {{localVariablePrefix}}resp.getData();{{/returnType}} + {{#returnType}}ApiResponse<{{{returnType}}}> localVarResp = {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}} + return localVarResp.getData();{{/returnType}} } /** @@ -349,12 +349,12 @@ public class {{classname}} { @Deprecated {{/isDeprecated}} public ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> executeWithHttpInfo() throws ApiException { - return {{operationId}}WithHttpInfo({{#allParams}}{{localVariablePrefix}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); + return {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); } /** * Execute {{operationId}} request (asynchronously) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object {{#isDeprecated}} @@ -364,8 +364,8 @@ public class {{classname}} { {{#isDeprecated}} @Deprecated {{/isDeprecated}} - public okhttp3.Call executeAsync(final ApiCallback<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> callback) throws ApiException { - return {{operationId}}Async({{#allParams}}{{localVariablePrefix}}{{paramName}}, {{/allParams}}callback); + public okhttp3.Call executeAsync(final ApiCallback<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> _callback) throws ApiException { + return {{operationId}}Async({{#allParams}}{{paramName}}, {{/allParams}}_callback); } } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index d02dc58bf2d..49f4e834540 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -36,33 +36,33 @@ import java.util.List; import java.util.Map; public class AnotherFakeApi { - private ApiClient apiClient; + private ApiClient localVarApiClient; public AnotherFakeApi() { this(Configuration.getDefaultApiClient()); } public AnotherFakeApi(ApiClient apiClient) { - this.apiClient = apiClient; + this.localVarApiClient = apiClient; } public ApiClient getApiClient() { - return apiClient; + return localVarApiClient; } public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; + this.localVarApiClient = apiClient; } /** * Build call for call123testSpecialTags * @param body client model (required) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener + * @param _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = body; // create path and map variables @@ -75,7 +75,7 @@ public class AnotherFakeApi { final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -83,27 +83,27 @@ public class AnotherFakeApi { final String[] localVarContentTypes = { "application/json" }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'body' is set if (body == null) { @@ -111,8 +111,8 @@ public class AnotherFakeApi { } - okhttp3.Call call = call123testSpecialTagsCall(body, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = call123testSpecialTagsCall(body, _progressListener, _progressRequestListener); + return localVarCall; } @@ -124,8 +124,8 @@ public class AnotherFakeApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Client call123testSpecialTags(Client body) throws ApiException { - ApiResponse resp = call123testSpecialTagsWithHttpInfo(body); - return resp.getData(); + ApiResponse localVarResp = call123testSpecialTagsWithHttpInfo(body); + return localVarResp.getData(); } /** @@ -136,43 +136,43 @@ public class AnotherFakeApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse call123testSpecialTagsWithHttpInfo(Client body) throws ApiException { - okhttp3.Call call = call123testSpecialTagsValidateBeforeCall(body, null, null); + okhttp3.Call localVarCall = call123testSpecialTagsValidateBeforeCall(body, null, null); Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * To test special tags (asynchronously) * To test special tags and operation ID starting with number * @param body client model (required) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call call123testSpecialTagsAsync(Client body, final ApiCallback callback) throws ApiException { + public okhttp3.Call call123testSpecialTagsAsync(Client body, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = call123testSpecialTagsValidateBeforeCall(body, progressListener, progressRequestListener); + okhttp3.Call localVarCall = call123testSpecialTagsValidateBeforeCall(body, _progressListener, _progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; } } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeApi.java index 08aef7f973b..d1fcd2043e4 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeApi.java @@ -44,33 +44,33 @@ import java.util.List; import java.util.Map; public class FakeApi { - private ApiClient apiClient; + private ApiClient localVarApiClient; public FakeApi() { this(Configuration.getDefaultApiClient()); } public FakeApi(ApiClient apiClient) { - this.apiClient = apiClient; + this.localVarApiClient = apiClient; } public ApiClient getApiClient() { - return apiClient; + return localVarApiClient; } public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; + this.localVarApiClient = apiClient; } /** * Build call for createXmlItem * @param xmlItem XmlItem Body (required) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener + * @param _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public okhttp3.Call createXmlItemCall(XmlItem xmlItem, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public okhttp3.Call createXmlItemCall(XmlItem xmlItem, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = xmlItem; // create path and map variables @@ -83,7 +83,7 @@ public class FakeApi { final String[] localVarAccepts = { }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -91,27 +91,27 @@ public class FakeApi { final String[] localVarContentTypes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @SuppressWarnings("rawtypes") - private okhttp3.Call createXmlItemValidateBeforeCall(XmlItem xmlItem, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private okhttp3.Call createXmlItemValidateBeforeCall(XmlItem xmlItem, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'xmlItem' is set if (xmlItem == null) { @@ -119,8 +119,8 @@ public class FakeApi { } - okhttp3.Call call = createXmlItemCall(xmlItem, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = createXmlItemCall(xmlItem, _progressListener, _progressRequestListener); + return localVarCall; } @@ -142,52 +142,52 @@ public class FakeApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse createXmlItemWithHttpInfo(XmlItem xmlItem) throws ApiException { - okhttp3.Call call = createXmlItemValidateBeforeCall(xmlItem, null, null); - return apiClient.execute(call); + okhttp3.Call localVarCall = createXmlItemValidateBeforeCall(xmlItem, null, null); + return localVarApiClient.execute(localVarCall); } /** * creates an XmlItem (asynchronously) * this route creates an XmlItem * @param xmlItem XmlItem Body (required) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call createXmlItemAsync(XmlItem xmlItem, final ApiCallback callback) throws ApiException { + public okhttp3.Call createXmlItemAsync(XmlItem xmlItem, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = createXmlItemValidateBeforeCall(xmlItem, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; + okhttp3.Call localVarCall = createXmlItemValidateBeforeCall(xmlItem, _progressListener, _progressRequestListener); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; } /** * Build call for fakeOuterBooleanSerialize * @param body Input boolean as post body (optional) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener + * @param _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public okhttp3.Call fakeOuterBooleanSerializeCall(Boolean body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public okhttp3.Call fakeOuterBooleanSerializeCall(Boolean body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = body; // create path and map variables @@ -200,7 +200,7 @@ public class FakeApi { final String[] localVarAccepts = { "*/*" }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -208,31 +208,31 @@ public class FakeApi { final String[] localVarContentTypes = { }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @SuppressWarnings("rawtypes") - private okhttp3.Call fakeOuterBooleanSerializeValidateBeforeCall(Boolean body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private okhttp3.Call fakeOuterBooleanSerializeValidateBeforeCall(Boolean body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { - okhttp3.Call call = fakeOuterBooleanSerializeCall(body, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = fakeOuterBooleanSerializeCall(body, _progressListener, _progressRequestListener); + return localVarCall; } @@ -244,8 +244,8 @@ public class FakeApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Boolean fakeOuterBooleanSerialize(Boolean body) throws ApiException { - ApiResponse resp = fakeOuterBooleanSerializeWithHttpInfo(body); - return resp.getData(); + ApiResponse localVarResp = fakeOuterBooleanSerializeWithHttpInfo(body); + return localVarResp.getData(); } /** @@ -256,54 +256,54 @@ public class FakeApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse fakeOuterBooleanSerializeWithHttpInfo(Boolean body) throws ApiException { - okhttp3.Call call = fakeOuterBooleanSerializeValidateBeforeCall(body, null, null); + okhttp3.Call localVarCall = fakeOuterBooleanSerializeValidateBeforeCall(body, null, null); Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) * Test serialization of outer boolean types * @param body Input boolean as post body (optional) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call fakeOuterBooleanSerializeAsync(Boolean body, final ApiCallback callback) throws ApiException { + public okhttp3.Call fakeOuterBooleanSerializeAsync(Boolean body, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = fakeOuterBooleanSerializeValidateBeforeCall(body, progressListener, progressRequestListener); + okhttp3.Call localVarCall = fakeOuterBooleanSerializeValidateBeforeCall(body, _progressListener, _progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; } /** * Build call for fakeOuterCompositeSerialize * @param body Input composite as post body (optional) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener + * @param _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public okhttp3.Call fakeOuterCompositeSerializeCall(OuterComposite body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public okhttp3.Call fakeOuterCompositeSerializeCall(OuterComposite body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = body; // create path and map variables @@ -316,7 +316,7 @@ public class FakeApi { final String[] localVarAccepts = { "*/*" }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -324,31 +324,31 @@ public class FakeApi { final String[] localVarContentTypes = { }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @SuppressWarnings("rawtypes") - private okhttp3.Call fakeOuterCompositeSerializeValidateBeforeCall(OuterComposite body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private okhttp3.Call fakeOuterCompositeSerializeValidateBeforeCall(OuterComposite body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { - okhttp3.Call call = fakeOuterCompositeSerializeCall(body, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = fakeOuterCompositeSerializeCall(body, _progressListener, _progressRequestListener); + return localVarCall; } @@ -360,8 +360,8 @@ public class FakeApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public OuterComposite fakeOuterCompositeSerialize(OuterComposite body) throws ApiException { - ApiResponse resp = fakeOuterCompositeSerializeWithHttpInfo(body); - return resp.getData(); + ApiResponse localVarResp = fakeOuterCompositeSerializeWithHttpInfo(body); + return localVarResp.getData(); } /** @@ -372,54 +372,54 @@ public class FakeApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse fakeOuterCompositeSerializeWithHttpInfo(OuterComposite body) throws ApiException { - okhttp3.Call call = fakeOuterCompositeSerializeValidateBeforeCall(body, null, null); + okhttp3.Call localVarCall = fakeOuterCompositeSerializeValidateBeforeCall(body, null, null); Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) * Test serialization of object with outer number type * @param body Input composite as post body (optional) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call fakeOuterCompositeSerializeAsync(OuterComposite body, final ApiCallback callback) throws ApiException { + public okhttp3.Call fakeOuterCompositeSerializeAsync(OuterComposite body, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = fakeOuterCompositeSerializeValidateBeforeCall(body, progressListener, progressRequestListener); + okhttp3.Call localVarCall = fakeOuterCompositeSerializeValidateBeforeCall(body, _progressListener, _progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; } /** * Build call for fakeOuterNumberSerialize * @param body Input number as post body (optional) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener + * @param _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public okhttp3.Call fakeOuterNumberSerializeCall(BigDecimal body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public okhttp3.Call fakeOuterNumberSerializeCall(BigDecimal body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = body; // create path and map variables @@ -432,7 +432,7 @@ public class FakeApi { final String[] localVarAccepts = { "*/*" }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -440,31 +440,31 @@ public class FakeApi { final String[] localVarContentTypes = { }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @SuppressWarnings("rawtypes") - private okhttp3.Call fakeOuterNumberSerializeValidateBeforeCall(BigDecimal body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private okhttp3.Call fakeOuterNumberSerializeValidateBeforeCall(BigDecimal body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { - okhttp3.Call call = fakeOuterNumberSerializeCall(body, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = fakeOuterNumberSerializeCall(body, _progressListener, _progressRequestListener); + return localVarCall; } @@ -476,8 +476,8 @@ public class FakeApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public BigDecimal fakeOuterNumberSerialize(BigDecimal body) throws ApiException { - ApiResponse resp = fakeOuterNumberSerializeWithHttpInfo(body); - return resp.getData(); + ApiResponse localVarResp = fakeOuterNumberSerializeWithHttpInfo(body); + return localVarResp.getData(); } /** @@ -488,54 +488,54 @@ public class FakeApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse fakeOuterNumberSerializeWithHttpInfo(BigDecimal body) throws ApiException { - okhttp3.Call call = fakeOuterNumberSerializeValidateBeforeCall(body, null, null); + okhttp3.Call localVarCall = fakeOuterNumberSerializeValidateBeforeCall(body, null, null); Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) * Test serialization of outer number types * @param body Input number as post body (optional) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call fakeOuterNumberSerializeAsync(BigDecimal body, final ApiCallback callback) throws ApiException { + public okhttp3.Call fakeOuterNumberSerializeAsync(BigDecimal body, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = fakeOuterNumberSerializeValidateBeforeCall(body, progressListener, progressRequestListener); + okhttp3.Call localVarCall = fakeOuterNumberSerializeValidateBeforeCall(body, _progressListener, _progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; } /** * Build call for fakeOuterStringSerialize * @param body Input string as post body (optional) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener + * @param _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public okhttp3.Call fakeOuterStringSerializeCall(String body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public okhttp3.Call fakeOuterStringSerializeCall(String body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = body; // create path and map variables @@ -548,7 +548,7 @@ public class FakeApi { final String[] localVarAccepts = { "*/*" }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -556,31 +556,31 @@ public class FakeApi { final String[] localVarContentTypes = { }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @SuppressWarnings("rawtypes") - private okhttp3.Call fakeOuterStringSerializeValidateBeforeCall(String body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private okhttp3.Call fakeOuterStringSerializeValidateBeforeCall(String body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { - okhttp3.Call call = fakeOuterStringSerializeCall(body, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = fakeOuterStringSerializeCall(body, _progressListener, _progressRequestListener); + return localVarCall; } @@ -592,8 +592,8 @@ public class FakeApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public String fakeOuterStringSerialize(String body) throws ApiException { - ApiResponse resp = fakeOuterStringSerializeWithHttpInfo(body); - return resp.getData(); + ApiResponse localVarResp = fakeOuterStringSerializeWithHttpInfo(body); + return localVarResp.getData(); } /** @@ -604,54 +604,54 @@ public class FakeApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse fakeOuterStringSerializeWithHttpInfo(String body) throws ApiException { - okhttp3.Call call = fakeOuterStringSerializeValidateBeforeCall(body, null, null); + okhttp3.Call localVarCall = fakeOuterStringSerializeValidateBeforeCall(body, null, null); Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) * Test serialization of outer string types * @param body Input string as post body (optional) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call fakeOuterStringSerializeAsync(String body, final ApiCallback callback) throws ApiException { + public okhttp3.Call fakeOuterStringSerializeAsync(String body, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = fakeOuterStringSerializeValidateBeforeCall(body, progressListener, progressRequestListener); + okhttp3.Call localVarCall = fakeOuterStringSerializeValidateBeforeCall(body, _progressListener, _progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; } /** * Build call for testBodyWithFileSchema * @param body (required) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener + * @param _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public okhttp3.Call testBodyWithFileSchemaCall(FileSchemaTestClass body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public okhttp3.Call testBodyWithFileSchemaCall(FileSchemaTestClass body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = body; // create path and map variables @@ -664,7 +664,7 @@ public class FakeApi { final String[] localVarAccepts = { }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -672,27 +672,27 @@ public class FakeApi { final String[] localVarContentTypes = { "application/json" }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @SuppressWarnings("rawtypes") - private okhttp3.Call testBodyWithFileSchemaValidateBeforeCall(FileSchemaTestClass body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private okhttp3.Call testBodyWithFileSchemaValidateBeforeCall(FileSchemaTestClass body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'body' is set if (body == null) { @@ -700,8 +700,8 @@ public class FakeApi { } - okhttp3.Call call = testBodyWithFileSchemaCall(body, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = testBodyWithFileSchemaCall(body, _progressListener, _progressRequestListener); + return localVarCall; } @@ -723,53 +723,53 @@ public class FakeApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass body) throws ApiException { - okhttp3.Call call = testBodyWithFileSchemaValidateBeforeCall(body, null, null); - return apiClient.execute(call); + okhttp3.Call localVarCall = testBodyWithFileSchemaValidateBeforeCall(body, null, null); + return localVarApiClient.execute(localVarCall); } /** * (asynchronously) * For this test, the body for this request much reference a schema named `File`. * @param body (required) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call testBodyWithFileSchemaAsync(FileSchemaTestClass body, final ApiCallback callback) throws ApiException { + public okhttp3.Call testBodyWithFileSchemaAsync(FileSchemaTestClass body, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = testBodyWithFileSchemaValidateBeforeCall(body, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; + okhttp3.Call localVarCall = testBodyWithFileSchemaValidateBeforeCall(body, _progressListener, _progressRequestListener); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; } /** * Build call for testBodyWithQueryParams * @param query (required) * @param body (required) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener + * @param _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public okhttp3.Call testBodyWithQueryParamsCall(String query, User body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public okhttp3.Call testBodyWithQueryParamsCall(String query, User body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = body; // create path and map variables @@ -778,7 +778,7 @@ public class FakeApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); if (query != null) { - localVarQueryParams.addAll(apiClient.parameterToPair("query", query)); + localVarQueryParams.addAll(localVarApiClient.parameterToPair("query", query)); } Map localVarHeaderParams = new HashMap(); @@ -786,7 +786,7 @@ public class FakeApi { final String[] localVarAccepts = { }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -794,27 +794,27 @@ public class FakeApi { final String[] localVarContentTypes = { "application/json" }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @SuppressWarnings("rawtypes") - private okhttp3.Call testBodyWithQueryParamsValidateBeforeCall(String query, User body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private okhttp3.Call testBodyWithQueryParamsValidateBeforeCall(String query, User body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'query' is set if (query == null) { @@ -827,8 +827,8 @@ public class FakeApi { } - okhttp3.Call call = testBodyWithQueryParamsCall(query, body, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = testBodyWithQueryParamsCall(query, body, _progressListener, _progressRequestListener); + return localVarCall; } @@ -852,8 +852,8 @@ public class FakeApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse testBodyWithQueryParamsWithHttpInfo(String query, User body) throws ApiException { - okhttp3.Call call = testBodyWithQueryParamsValidateBeforeCall(query, body, null, null); - return apiClient.execute(call); + okhttp3.Call localVarCall = testBodyWithQueryParamsValidateBeforeCall(query, body, null, null); + return localVarApiClient.execute(localVarCall); } /** @@ -861,44 +861,44 @@ public class FakeApi { * * @param query (required) * @param body (required) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call testBodyWithQueryParamsAsync(String query, User body, final ApiCallback callback) throws ApiException { + public okhttp3.Call testBodyWithQueryParamsAsync(String query, User body, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = testBodyWithQueryParamsValidateBeforeCall(query, body, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; + okhttp3.Call localVarCall = testBodyWithQueryParamsValidateBeforeCall(query, body, _progressListener, _progressRequestListener); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; } /** * Build call for testClientModel * @param body client model (required) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener + * @param _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public okhttp3.Call testClientModelCall(Client body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public okhttp3.Call testClientModelCall(Client body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = body; // create path and map variables @@ -911,7 +911,7 @@ public class FakeApi { final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -919,27 +919,27 @@ public class FakeApi { final String[] localVarContentTypes = { "application/json" }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @SuppressWarnings("rawtypes") - private okhttp3.Call testClientModelValidateBeforeCall(Client body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private okhttp3.Call testClientModelValidateBeforeCall(Client body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'body' is set if (body == null) { @@ -947,8 +947,8 @@ public class FakeApi { } - okhttp3.Call call = testClientModelCall(body, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = testClientModelCall(body, _progressListener, _progressRequestListener); + return localVarCall; } @@ -960,8 +960,8 @@ public class FakeApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Client testClientModel(Client body) throws ApiException { - ApiResponse resp = testClientModelWithHttpInfo(body); - return resp.getData(); + ApiResponse localVarResp = testClientModelWithHttpInfo(body); + return localVarResp.getData(); } /** @@ -972,44 +972,44 @@ public class FakeApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse testClientModelWithHttpInfo(Client body) throws ApiException { - okhttp3.Call call = testClientModelValidateBeforeCall(body, null, null); + okhttp3.Call localVarCall = testClientModelValidateBeforeCall(body, null, null); Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * To test \"client\" model (asynchronously) * To test \"client\" model * @param body client model (required) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call testClientModelAsync(Client body, final ApiCallback callback) throws ApiException { + public okhttp3.Call testClientModelAsync(Client body, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = testClientModelValidateBeforeCall(body, progressListener, progressRequestListener); + okhttp3.Call localVarCall = testClientModelValidateBeforeCall(body, _progressListener, _progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; } /** * Build call for testEndpointParameters @@ -1027,12 +1027,12 @@ public class FakeApi { * @param dateTime None (optional) * @param password None (optional) * @param paramCallback None (optional) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener + * @param _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public okhttp3.Call testEndpointParametersCall(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public okhttp3.Call testEndpointParametersCall(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = new Object(); // create path and map variables @@ -1101,7 +1101,7 @@ public class FakeApi { final String[] localVarAccepts = { }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -1109,27 +1109,27 @@ public class FakeApi { final String[] localVarContentTypes = { "application/x-www-form-urlencoded" }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { "http_basic_test" }; - return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @SuppressWarnings("rawtypes") - private okhttp3.Call testEndpointParametersValidateBeforeCall(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private okhttp3.Call testEndpointParametersValidateBeforeCall(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'number' is set if (number == null) { @@ -1152,8 +1152,8 @@ public class FakeApi { } - okhttp3.Call call = testEndpointParametersCall(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = testEndpointParametersCall(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback, _progressListener, _progressRequestListener); + return localVarCall; } @@ -1201,8 +1201,8 @@ public class FakeApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse testEndpointParametersWithHttpInfo(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws ApiException { - okhttp3.Call call = testEndpointParametersValidateBeforeCall(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback, null, null); - return apiClient.execute(call); + okhttp3.Call localVarCall = testEndpointParametersValidateBeforeCall(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback, null, null); + return localVarApiClient.execute(localVarCall); } /** @@ -1222,34 +1222,34 @@ public class FakeApi { * @param dateTime None (optional) * @param password None (optional) * @param paramCallback None (optional) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call testEndpointParametersAsync(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback, final ApiCallback callback) throws ApiException { + public okhttp3.Call testEndpointParametersAsync(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = testEndpointParametersValidateBeforeCall(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; + okhttp3.Call localVarCall = testEndpointParametersValidateBeforeCall(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback, _progressListener, _progressRequestListener); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; } /** * Build call for testEnumParameters @@ -1261,12 +1261,12 @@ public class FakeApi { * @param enumQueryDouble Query parameter enum test (double) (optional) * @param enumFormStringArray Form parameter enum test (string array) (optional) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener + * @param _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public okhttp3.Call testEnumParametersCall(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public okhttp3.Call testEnumParametersCall(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = new Object(); // create path and map variables @@ -1275,28 +1275,28 @@ public class FakeApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); if (enumQueryStringArray != null) { - localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("csv", "enum_query_string_array", enumQueryStringArray)); + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "enum_query_string_array", enumQueryStringArray)); } if (enumQueryString != null) { - localVarQueryParams.addAll(apiClient.parameterToPair("enum_query_string", enumQueryString)); + localVarQueryParams.addAll(localVarApiClient.parameterToPair("enum_query_string", enumQueryString)); } if (enumQueryInteger != null) { - localVarQueryParams.addAll(apiClient.parameterToPair("enum_query_integer", enumQueryInteger)); + localVarQueryParams.addAll(localVarApiClient.parameterToPair("enum_query_integer", enumQueryInteger)); } if (enumQueryDouble != null) { - localVarQueryParams.addAll(apiClient.parameterToPair("enum_query_double", enumQueryDouble)); + localVarQueryParams.addAll(localVarApiClient.parameterToPair("enum_query_double", enumQueryDouble)); } Map localVarHeaderParams = new HashMap(); if (enumHeaderStringArray != null) { - localVarHeaderParams.put("enum_header_string_array", apiClient.parameterToString(enumHeaderStringArray)); + localVarHeaderParams.put("enum_header_string_array", localVarApiClient.parameterToString(enumHeaderStringArray)); } if (enumHeaderString != null) { - localVarHeaderParams.put("enum_header_string", apiClient.parameterToString(enumHeaderString)); + localVarHeaderParams.put("enum_header_string", localVarApiClient.parameterToString(enumHeaderString)); } Map localVarFormParams = new HashMap(); @@ -1311,7 +1311,7 @@ public class FakeApi { final String[] localVarAccepts = { }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -1319,31 +1319,31 @@ public class FakeApi { final String[] localVarContentTypes = { "application/x-www-form-urlencoded" }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @SuppressWarnings("rawtypes") - private okhttp3.Call testEnumParametersValidateBeforeCall(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private okhttp3.Call testEnumParametersValidateBeforeCall(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { - okhttp3.Call call = testEnumParametersCall(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = testEnumParametersCall(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, _progressListener, _progressRequestListener); + return localVarCall; } @@ -1379,8 +1379,8 @@ public class FakeApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse testEnumParametersWithHttpInfo(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws ApiException { - okhttp3.Call call = testEnumParametersValidateBeforeCall(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, null, null); - return apiClient.execute(call); + okhttp3.Call localVarCall = testEnumParametersValidateBeforeCall(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, null, null); + return localVarApiClient.execute(localVarCall); } /** @@ -1394,36 +1394,36 @@ public class FakeApi { * @param enumQueryDouble Query parameter enum test (double) (optional) * @param enumFormStringArray Form parameter enum test (string array) (optional) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call testEnumParametersAsync(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString, final ApiCallback callback) throws ApiException { + public okhttp3.Call testEnumParametersAsync(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = testEnumParametersValidateBeforeCall(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; + okhttp3.Call localVarCall = testEnumParametersValidateBeforeCall(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, _progressListener, _progressRequestListener); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; } - private okhttp3.Call testGroupParametersCall(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private okhttp3.Call testGroupParametersCall(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = new Object(); // create path and map variables @@ -1432,35 +1432,35 @@ public class FakeApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); if (requiredStringGroup != null) { - localVarQueryParams.addAll(apiClient.parameterToPair("required_string_group", requiredStringGroup)); + localVarQueryParams.addAll(localVarApiClient.parameterToPair("required_string_group", requiredStringGroup)); } if (requiredInt64Group != null) { - localVarQueryParams.addAll(apiClient.parameterToPair("required_int64_group", requiredInt64Group)); + localVarQueryParams.addAll(localVarApiClient.parameterToPair("required_int64_group", requiredInt64Group)); } if (stringGroup != null) { - localVarQueryParams.addAll(apiClient.parameterToPair("string_group", stringGroup)); + localVarQueryParams.addAll(localVarApiClient.parameterToPair("string_group", stringGroup)); } if (int64Group != null) { - localVarQueryParams.addAll(apiClient.parameterToPair("int64_group", int64Group)); + localVarQueryParams.addAll(localVarApiClient.parameterToPair("int64_group", int64Group)); } Map localVarHeaderParams = new HashMap(); if (requiredBooleanGroup != null) { - localVarHeaderParams.put("required_boolean_group", apiClient.parameterToString(requiredBooleanGroup)); + localVarHeaderParams.put("required_boolean_group", localVarApiClient.parameterToString(requiredBooleanGroup)); } if (booleanGroup != null) { - localVarHeaderParams.put("boolean_group", apiClient.parameterToString(booleanGroup)); + localVarHeaderParams.put("boolean_group", localVarApiClient.parameterToString(booleanGroup)); } Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -1468,27 +1468,27 @@ public class FakeApi { final String[] localVarContentTypes = { }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @SuppressWarnings("rawtypes") - private okhttp3.Call testGroupParametersValidateBeforeCall(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private okhttp3.Call testGroupParametersValidateBeforeCall(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'requiredStringGroup' is set if (requiredStringGroup == null) { @@ -1506,41 +1506,41 @@ public class FakeApi { } - okhttp3.Call call = testGroupParametersCall(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = testGroupParametersCall(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, _progressListener, _progressRequestListener); + return localVarCall; } private ApiResponse testGroupParametersWithHttpInfo(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException { - okhttp3.Call call = testGroupParametersValidateBeforeCall(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, null, null); - return apiClient.execute(call); + okhttp3.Call localVarCall = testGroupParametersValidateBeforeCall(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, null, null); + return localVarApiClient.execute(localVarCall); } - private okhttp3.Call testGroupParametersAsync(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group, final ApiCallback callback) throws ApiException { + private okhttp3.Call testGroupParametersAsync(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = testGroupParametersValidateBeforeCall(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; + okhttp3.Call localVarCall = testGroupParametersValidateBeforeCall(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, _progressListener, _progressRequestListener); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; } public class APItestGroupParametersRequest { @@ -1589,13 +1589,13 @@ public class FakeApi { /** * Build call for testGroupParameters - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener + * @param _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public okhttp3.Call buildCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - return testGroupParametersCall(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, progressListener, progressRequestListener); + public okhttp3.Call buildCall(final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { + return testGroupParametersCall(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, _progressListener, _progressRequestListener); } /** @@ -1617,12 +1617,12 @@ public class FakeApi { /** * Execute testGroupParameters request (asynchronously) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call executeAsync(final ApiCallback callback) throws ApiException { - return testGroupParametersAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return testGroupParametersAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, _callback); } } @@ -1640,12 +1640,12 @@ public class FakeApi { /** * Build call for testInlineAdditionalProperties * @param param request body (required) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener + * @param _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public okhttp3.Call testInlineAdditionalPropertiesCall(Map param, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public okhttp3.Call testInlineAdditionalPropertiesCall(Map param, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = param; // create path and map variables @@ -1658,7 +1658,7 @@ public class FakeApi { final String[] localVarAccepts = { }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -1666,27 +1666,27 @@ public class FakeApi { final String[] localVarContentTypes = { "application/json" }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @SuppressWarnings("rawtypes") - private okhttp3.Call testInlineAdditionalPropertiesValidateBeforeCall(Map param, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private okhttp3.Call testInlineAdditionalPropertiesValidateBeforeCall(Map param, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'param' is set if (param == null) { @@ -1694,8 +1694,8 @@ public class FakeApi { } - okhttp3.Call call = testInlineAdditionalPropertiesCall(param, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = testInlineAdditionalPropertiesCall(param, _progressListener, _progressRequestListener); + return localVarCall; } @@ -1717,53 +1717,53 @@ public class FakeApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse testInlineAdditionalPropertiesWithHttpInfo(Map param) throws ApiException { - okhttp3.Call call = testInlineAdditionalPropertiesValidateBeforeCall(param, null, null); - return apiClient.execute(call); + okhttp3.Call localVarCall = testInlineAdditionalPropertiesValidateBeforeCall(param, null, null); + return localVarApiClient.execute(localVarCall); } /** * test inline additionalProperties (asynchronously) * * @param param request body (required) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call testInlineAdditionalPropertiesAsync(Map param, final ApiCallback callback) throws ApiException { + public okhttp3.Call testInlineAdditionalPropertiesAsync(Map param, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = testInlineAdditionalPropertiesValidateBeforeCall(param, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; + okhttp3.Call localVarCall = testInlineAdditionalPropertiesValidateBeforeCall(param, _progressListener, _progressRequestListener); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; } /** * Build call for testJsonFormData * @param param field1 (required) * @param param2 field2 (required) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener + * @param _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public okhttp3.Call testJsonFormDataCall(String param, String param2, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public okhttp3.Call testJsonFormDataCall(String param, String param2, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = new Object(); // create path and map variables @@ -1784,7 +1784,7 @@ public class FakeApi { final String[] localVarAccepts = { }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -1792,27 +1792,27 @@ public class FakeApi { final String[] localVarContentTypes = { "application/x-www-form-urlencoded" }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @SuppressWarnings("rawtypes") - private okhttp3.Call testJsonFormDataValidateBeforeCall(String param, String param2, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private okhttp3.Call testJsonFormDataValidateBeforeCall(String param, String param2, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'param' is set if (param == null) { @@ -1825,8 +1825,8 @@ public class FakeApi { } - okhttp3.Call call = testJsonFormDataCall(param, param2, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = testJsonFormDataCall(param, param2, _progressListener, _progressRequestListener); + return localVarCall; } @@ -1850,8 +1850,8 @@ public class FakeApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse testJsonFormDataWithHttpInfo(String param, String param2) throws ApiException { - okhttp3.Call call = testJsonFormDataValidateBeforeCall(param, param2, null, null); - return apiClient.execute(call); + okhttp3.Call localVarCall = testJsonFormDataValidateBeforeCall(param, param2, null, null); + return localVarApiClient.execute(localVarCall); } /** @@ -1859,33 +1859,33 @@ public class FakeApi { * * @param param field1 (required) * @param param2 field2 (required) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call testJsonFormDataAsync(String param, String param2, final ApiCallback callback) throws ApiException { + public okhttp3.Call testJsonFormDataAsync(String param, String param2, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = testJsonFormDataValidateBeforeCall(param, param2, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; + okhttp3.Call localVarCall = testJsonFormDataValidateBeforeCall(param, param2, _progressListener, _progressRequestListener); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; } } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index 787906d9861..84adce504b5 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -36,33 +36,33 @@ import java.util.List; import java.util.Map; public class FakeClassnameTags123Api { - private ApiClient apiClient; + private ApiClient localVarApiClient; public FakeClassnameTags123Api() { this(Configuration.getDefaultApiClient()); } public FakeClassnameTags123Api(ApiClient apiClient) { - this.apiClient = apiClient; + this.localVarApiClient = apiClient; } public ApiClient getApiClient() { - return apiClient; + return localVarApiClient; } public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; + this.localVarApiClient = apiClient; } /** * Build call for testClassname * @param body client model (required) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener + * @param _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = body; // create path and map variables @@ -75,7 +75,7 @@ public class FakeClassnameTags123Api { final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -83,27 +83,27 @@ public class FakeClassnameTags123Api { final String[] localVarContentTypes = { "application/json" }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { "api_key_query" }; - return apiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'body' is set if (body == null) { @@ -111,8 +111,8 @@ public class FakeClassnameTags123Api { } - okhttp3.Call call = testClassnameCall(body, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = testClassnameCall(body, _progressListener, _progressRequestListener); + return localVarCall; } @@ -124,8 +124,8 @@ public class FakeClassnameTags123Api { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Client testClassname(Client body) throws ApiException { - ApiResponse resp = testClassnameWithHttpInfo(body); - return resp.getData(); + ApiResponse localVarResp = testClassnameWithHttpInfo(body); + return localVarResp.getData(); } /** @@ -136,43 +136,43 @@ public class FakeClassnameTags123Api { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse testClassnameWithHttpInfo(Client body) throws ApiException { - okhttp3.Call call = testClassnameValidateBeforeCall(body, null, null); + okhttp3.Call localVarCall = testClassnameValidateBeforeCall(body, null, null); Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * To test class name in snake case (asynchronously) * To test class name in snake case * @param body client model (required) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call testClassnameAsync(Client body, final ApiCallback callback) throws ApiException { + public okhttp3.Call testClassnameAsync(Client body, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = testClassnameValidateBeforeCall(body, progressListener, progressRequestListener); + okhttp3.Call localVarCall = testClassnameValidateBeforeCall(body, _progressListener, _progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; } } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/PetApi.java index aacd1af92b8..795640173ad 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/PetApi.java @@ -38,33 +38,33 @@ import java.util.List; import java.util.Map; public class PetApi { - private ApiClient apiClient; + private ApiClient localVarApiClient; public PetApi() { this(Configuration.getDefaultApiClient()); } public PetApi(ApiClient apiClient) { - this.apiClient = apiClient; + this.localVarApiClient = apiClient; } public ApiClient getApiClient() { - return apiClient; + return localVarApiClient; } public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; + this.localVarApiClient = apiClient; } /** * 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 _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = body; // create path and map variables @@ -77,7 +77,7 @@ public class PetApi { final String[] localVarAccepts = { }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -85,27 +85,27 @@ public class PetApi { final String[] localVarContentTypes = { "application/json", "application/xml" }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { "petstore_auth" }; - return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'body' is set if (body == null) { @@ -113,8 +113,8 @@ public class PetApi { } - okhttp3.Call call = addPetCall(body, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = addPetCall(body, _progressListener, _progressRequestListener); + return localVarCall; } @@ -136,71 +136,71 @@ public class PetApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse addPetWithHttpInfo(Pet body) throws ApiException { - okhttp3.Call call = addPetValidateBeforeCall(body, null, null); - return apiClient.execute(call); + okhttp3.Call localVarCall = addPetValidateBeforeCall(body, null, null); + return localVarApiClient.execute(localVarCall); } /** * Add a new pet to the store (asynchronously) * * @param body Pet object that needs to be added to the store (required) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call addPetAsync(Pet body, final ApiCallback callback) throws ApiException { + public okhttp3.Call addPetAsync(Pet body, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = addPetValidateBeforeCall(body, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; + okhttp3.Call localVarCall = addPetValidateBeforeCall(body, _progressListener, _progressRequestListener); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; } /** * Build call for deletePet * @param petId Pet id to delete (required) * @param apiKey (optional) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener + * @param _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/pet/{petId}" - .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); + .replaceAll("\\{" + "petId" + "\\}", localVarApiClient.escapeString(petId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); if (apiKey != null) { - localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey)); + localVarHeaderParams.put("api_key", localVarApiClient.parameterToString(apiKey)); } Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -208,27 +208,27 @@ public class PetApi { final String[] localVarContentTypes = { }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { "petstore_auth" }; - return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'petId' is set if (petId == null) { @@ -236,8 +236,8 @@ public class PetApi { } - okhttp3.Call call = deletePetCall(petId, apiKey, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = deletePetCall(petId, apiKey, _progressListener, _progressRequestListener); + return localVarCall; } @@ -261,8 +261,8 @@ public class PetApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse deletePetWithHttpInfo(Long petId, String apiKey) throws ApiException { - okhttp3.Call call = deletePetValidateBeforeCall(petId, apiKey, null, null); - return apiClient.execute(call); + okhttp3.Call localVarCall = deletePetValidateBeforeCall(petId, apiKey, null, null); + return localVarApiClient.execute(localVarCall); } /** @@ -270,44 +270,44 @@ public class PetApi { * * @param petId Pet id to delete (required) * @param apiKey (optional) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call deletePetAsync(Long petId, String apiKey, final ApiCallback callback) throws ApiException { + public okhttp3.Call deletePetAsync(Long petId, String apiKey, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = deletePetValidateBeforeCall(petId, apiKey, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; + okhttp3.Call localVarCall = deletePetValidateBeforeCall(petId, apiKey, _progressListener, _progressRequestListener); + 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 _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public okhttp3.Call findPetsByStatusCall(List status, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public okhttp3.Call findPetsByStatusCall(List status, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = new Object(); // create path and map variables @@ -316,7 +316,7 @@ public class PetApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); if (status != null) { - localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("csv", "status", status)); + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "status", status)); } Map localVarHeaderParams = new HashMap(); @@ -324,7 +324,7 @@ public class PetApi { final String[] localVarAccepts = { "application/xml", "application/json" }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -332,27 +332,27 @@ public class PetApi { final String[] localVarContentTypes = { }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { "petstore_auth" }; - return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @SuppressWarnings("rawtypes") - private okhttp3.Call findPetsByStatusValidateBeforeCall(List status, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private okhttp3.Call findPetsByStatusValidateBeforeCall(List status, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'status' is set if (status == null) { @@ -360,8 +360,8 @@ public class PetApi { } - okhttp3.Call call = findPetsByStatusCall(status, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = findPetsByStatusCall(status, _progressListener, _progressRequestListener); + return localVarCall; } @@ -373,8 +373,8 @@ public class PetApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public List findPetsByStatus(List status) throws ApiException { - ApiResponse> resp = findPetsByStatusWithHttpInfo(status); - return resp.getData(); + ApiResponse> localVarResp = findPetsByStatusWithHttpInfo(status); + return localVarResp.getData(); } /** @@ -385,56 +385,56 @@ public class PetApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse> findPetsByStatusWithHttpInfo(List status) throws ApiException { - okhttp3.Call call = findPetsByStatusValidateBeforeCall(status, null, null); + okhttp3.Call localVarCall = findPetsByStatusValidateBeforeCall(status, null, null); Type localVarReturnType = new TypeToken>(){}.getType(); - return apiClient.execute(call, localVarReturnType); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Finds Pets by status (asynchronously) * Multiple status values can be provided with comma separated strings * @param status Status values that need to be considered for filter (required) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call findPetsByStatusAsync(List status, final ApiCallback> callback) throws ApiException { + public okhttp3.Call findPetsByStatusAsync(List status, final ApiCallback> _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = findPetsByStatusValidateBeforeCall(status, progressListener, progressRequestListener); + okhttp3.Call localVarCall = findPetsByStatusValidateBeforeCall(status, _progressListener, _progressRequestListener); Type localVarReturnType = new TypeToken>(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; } /** * Build call for findPetsByTags * @param tags Tags to filter by (required) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener + * @param _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object * @deprecated */ @Deprecated - public okhttp3.Call findPetsByTagsCall(List tags, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public okhttp3.Call findPetsByTagsCall(List tags, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = new Object(); // create path and map variables @@ -443,7 +443,7 @@ public class PetApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); if (tags != null) { - localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("csv", "tags", tags)); + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "tags", tags)); } Map localVarHeaderParams = new HashMap(); @@ -451,7 +451,7 @@ public class PetApi { final String[] localVarAccepts = { "application/xml", "application/json" }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -459,28 +459,28 @@ public class PetApi { final String[] localVarContentTypes = { }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { "petstore_auth" }; - return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @Deprecated @SuppressWarnings("rawtypes") - private okhttp3.Call findPetsByTagsValidateBeforeCall(List tags, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private okhttp3.Call findPetsByTagsValidateBeforeCall(List tags, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'tags' is set if (tags == null) { @@ -488,8 +488,8 @@ public class PetApi { } - okhttp3.Call call = findPetsByTagsCall(tags, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = findPetsByTagsCall(tags, _progressListener, _progressRequestListener); + return localVarCall; } @@ -503,8 +503,8 @@ public class PetApi { */ @Deprecated public List findPetsByTags(List tags) throws ApiException { - ApiResponse> resp = findPetsByTagsWithHttpInfo(tags); - return resp.getData(); + ApiResponse> localVarResp = findPetsByTagsWithHttpInfo(tags); + return localVarResp.getData(); } /** @@ -517,61 +517,61 @@ public class PetApi { */ @Deprecated public ApiResponse> findPetsByTagsWithHttpInfo(List tags) throws ApiException { - okhttp3.Call call = findPetsByTagsValidateBeforeCall(tags, null, null); + okhttp3.Call localVarCall = findPetsByTagsValidateBeforeCall(tags, null, null); Type localVarReturnType = new TypeToken>(){}.getType(); - return apiClient.execute(call, localVarReturnType); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Finds Pets by tags (asynchronously) * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * @param tags Tags to filter by (required) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @deprecated */ @Deprecated - public okhttp3.Call findPetsByTagsAsync(List tags, final ApiCallback> callback) throws ApiException { + public okhttp3.Call findPetsByTagsAsync(List tags, final ApiCallback> _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = findPetsByTagsValidateBeforeCall(tags, progressListener, progressRequestListener); + okhttp3.Call localVarCall = findPetsByTagsValidateBeforeCall(tags, _progressListener, _progressRequestListener); Type localVarReturnType = new TypeToken>(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; } /** * Build call for getPetById * @param petId ID of pet to return (required) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener + * @param _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/pet/{petId}" - .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); + .replaceAll("\\{" + "petId" + "\\}", localVarApiClient.escapeString(petId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -580,7 +580,7 @@ public class PetApi { final String[] localVarAccepts = { "application/xml", "application/json" }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -588,27 +588,27 @@ public class PetApi { final String[] localVarContentTypes = { }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { "api_key" }; - return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'petId' is set if (petId == null) { @@ -616,8 +616,8 @@ public class PetApi { } - okhttp3.Call call = getPetByIdCall(petId, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = getPetByIdCall(petId, _progressListener, _progressRequestListener); + return localVarCall; } @@ -629,8 +629,8 @@ public class PetApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Pet getPetById(Long petId) throws ApiException { - ApiResponse resp = getPetByIdWithHttpInfo(petId); - return resp.getData(); + ApiResponse localVarResp = getPetByIdWithHttpInfo(petId); + return localVarResp.getData(); } /** @@ -641,54 +641,54 @@ public class PetApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse getPetByIdWithHttpInfo(Long petId) throws ApiException { - okhttp3.Call call = getPetByIdValidateBeforeCall(petId, null, null); + okhttp3.Call localVarCall = getPetByIdValidateBeforeCall(petId, null, null); Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Find pet by ID (asynchronously) * Returns a single pet * @param petId ID of pet to return (required) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call getPetByIdAsync(Long petId, final ApiCallback callback) throws ApiException { + public okhttp3.Call getPetByIdAsync(Long petId, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = getPetByIdValidateBeforeCall(petId, progressListener, progressRequestListener); + okhttp3.Call localVarCall = getPetByIdValidateBeforeCall(petId, _progressListener, _progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; } /** * 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 _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = body; // create path and map variables @@ -701,7 +701,7 @@ public class PetApi { final String[] localVarAccepts = { }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -709,27 +709,27 @@ public class PetApi { final String[] localVarContentTypes = { "application/json", "application/xml" }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { "petstore_auth" }; - return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'body' is set if (body == null) { @@ -737,8 +737,8 @@ public class PetApi { } - okhttp3.Call call = updatePetCall(body, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = updatePetCall(body, _progressListener, _progressRequestListener); + return localVarCall; } @@ -760,59 +760,59 @@ public class PetApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse updatePetWithHttpInfo(Pet body) throws ApiException { - okhttp3.Call call = updatePetValidateBeforeCall(body, null, null); - return apiClient.execute(call); + okhttp3.Call localVarCall = updatePetValidateBeforeCall(body, null, null); + return localVarApiClient.execute(localVarCall); } /** * Update an existing pet (asynchronously) * * @param body Pet object that needs to be added to the store (required) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call updatePetAsync(Pet body, final ApiCallback callback) throws ApiException { + public okhttp3.Call updatePetAsync(Pet body, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = updatePetValidateBeforeCall(body, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; + okhttp3.Call localVarCall = updatePetValidateBeforeCall(body, _progressListener, _progressRequestListener); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; } /** * Build call for updatePetWithForm * @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 _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/pet/{petId}" - .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); + .replaceAll("\\{" + "petId" + "\\}", localVarApiClient.escapeString(petId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -829,7 +829,7 @@ public class PetApi { final String[] localVarAccepts = { }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -837,27 +837,27 @@ public class PetApi { final String[] localVarContentTypes = { "application/x-www-form-urlencoded" }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { "petstore_auth" }; - return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'petId' is set if (petId == null) { @@ -865,8 +865,8 @@ public class PetApi { } - okhttp3.Call call = updatePetWithFormCall(petId, name, status, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = updatePetWithFormCall(petId, name, status, _progressListener, _progressRequestListener); + return localVarCall; } @@ -892,8 +892,8 @@ public class PetApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse updatePetWithFormWithHttpInfo(Long petId, String name, String status) throws ApiException { - okhttp3.Call call = updatePetWithFormValidateBeforeCall(petId, name, status, null, null); - return apiClient.execute(call); + okhttp3.Call localVarCall = updatePetWithFormValidateBeforeCall(petId, name, status, null, null); + return localVarApiClient.execute(localVarCall); } /** @@ -902,51 +902,51 @@ 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 callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call updatePetWithFormAsync(Long petId, String name, String status, final ApiCallback callback) throws ApiException { + public okhttp3.Call updatePetWithFormAsync(Long petId, String name, String status, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = updatePetWithFormValidateBeforeCall(petId, name, status, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; + okhttp3.Call localVarCall = updatePetWithFormValidateBeforeCall(petId, name, status, _progressListener, _progressRequestListener); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; } /** * Build call for uploadFile * @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 _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/pet/{petId}/uploadImage" - .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); + .replaceAll("\\{" + "petId" + "\\}", localVarApiClient.escapeString(petId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -963,7 +963,7 @@ public class PetApi { final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -971,27 +971,27 @@ public class PetApi { final String[] localVarContentTypes = { "multipart/form-data" }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { "petstore_auth" }; - return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'petId' is set if (petId == null) { @@ -999,8 +999,8 @@ public class PetApi { } - okhttp3.Call call = uploadFileCall(petId, additionalMetadata, file, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = uploadFileCall(petId, additionalMetadata, file, _progressListener, _progressRequestListener); + return localVarCall; } @@ -1014,8 +1014,8 @@ public class PetApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File file) throws ApiException { - ApiResponse resp = uploadFileWithHttpInfo(petId, additionalMetadata, file); - return resp.getData(); + ApiResponse localVarResp = uploadFileWithHttpInfo(petId, additionalMetadata, file); + return localVarResp.getData(); } /** @@ -1028,9 +1028,9 @@ public class PetApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse uploadFileWithHttpInfo(Long petId, String additionalMetadata, File file) throws ApiException { - okhttp3.Call call = uploadFileValidateBeforeCall(petId, additionalMetadata, file, null, null); + okhttp3.Call localVarCall = uploadFileValidateBeforeCall(petId, additionalMetadata, file, null, null); Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** @@ -1039,52 +1039,52 @@ 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 callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call uploadFileAsync(Long petId, String additionalMetadata, File file, final ApiCallback callback) throws ApiException { + public okhttp3.Call uploadFileAsync(Long petId, String additionalMetadata, File file, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = uploadFileValidateBeforeCall(petId, additionalMetadata, file, progressListener, progressRequestListener); + okhttp3.Call localVarCall = uploadFileValidateBeforeCall(petId, additionalMetadata, file, _progressListener, _progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; } /** * Build call for uploadFileWithRequiredFile * @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 _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/fake/{petId}/uploadImageWithRequiredFile" - .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); + .replaceAll("\\{" + "petId" + "\\}", localVarApiClient.escapeString(petId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1101,7 +1101,7 @@ public class PetApi { final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -1109,27 +1109,27 @@ public class PetApi { final String[] localVarContentTypes = { "multipart/form-data" }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { "petstore_auth" }; - return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'petId' is set if (petId == null) { @@ -1142,8 +1142,8 @@ public class PetApi { } - okhttp3.Call call = uploadFileWithRequiredFileCall(petId, requiredFile, additionalMetadata, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = uploadFileWithRequiredFileCall(petId, requiredFile, additionalMetadata, _progressListener, _progressRequestListener); + return localVarCall; } @@ -1157,8 +1157,8 @@ public class PetApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ModelApiResponse uploadFileWithRequiredFile(Long petId, File requiredFile, String additionalMetadata) throws ApiException { - ApiResponse resp = uploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata); - return resp.getData(); + ApiResponse localVarResp = uploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata); + return localVarResp.getData(); } /** @@ -1171,9 +1171,9 @@ public class PetApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse uploadFileWithRequiredFileWithHttpInfo(Long petId, File requiredFile, String additionalMetadata) throws ApiException { - okhttp3.Call call = uploadFileWithRequiredFileValidateBeforeCall(petId, requiredFile, additionalMetadata, null, null); + okhttp3.Call localVarCall = uploadFileWithRequiredFileValidateBeforeCall(petId, requiredFile, additionalMetadata, null, null); Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** @@ -1182,34 +1182,34 @@ 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 callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call uploadFileWithRequiredFileAsync(Long petId, File requiredFile, String additionalMetadata, final ApiCallback callback) throws ApiException { + public okhttp3.Call uploadFileWithRequiredFileAsync(Long petId, File requiredFile, String additionalMetadata, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = uploadFileWithRequiredFileValidateBeforeCall(petId, requiredFile, additionalMetadata, progressListener, progressRequestListener); + okhttp3.Call localVarCall = uploadFileWithRequiredFileValidateBeforeCall(petId, requiredFile, additionalMetadata, _progressListener, _progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; } } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/StoreApi.java index 0fa806a491f..c43fecbf92a 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/StoreApi.java @@ -36,38 +36,38 @@ import java.util.List; import java.util.Map; public class StoreApi { - private ApiClient apiClient; + private ApiClient localVarApiClient; public StoreApi() { this(Configuration.getDefaultApiClient()); } public StoreApi(ApiClient apiClient) { - this.apiClient = apiClient; + this.localVarApiClient = apiClient; } public ApiClient getApiClient() { - return apiClient; + return localVarApiClient; } public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; + this.localVarApiClient = apiClient; } /** * 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 _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/store/order/{order_id}" - .replaceAll("\\{" + "order_id" + "\\}", apiClient.escapeString(orderId.toString())); + .replaceAll("\\{" + "order_id" + "\\}", localVarApiClient.escapeString(orderId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -76,7 +76,7 @@ public class StoreApi { final String[] localVarAccepts = { }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -84,27 +84,27 @@ public class StoreApi { final String[] localVarContentTypes = { }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'orderId' is set if (orderId == null) { @@ -112,8 +112,8 @@ public class StoreApi { } - okhttp3.Call call = deleteOrderCall(orderId, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = deleteOrderCall(orderId, _progressListener, _progressRequestListener); + return localVarCall; } @@ -135,51 +135,51 @@ public class StoreApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse deleteOrderWithHttpInfo(String orderId) throws ApiException { - okhttp3.Call call = deleteOrderValidateBeforeCall(orderId, null, null); - return apiClient.execute(call); + okhttp3.Call localVarCall = deleteOrderValidateBeforeCall(orderId, null, null); + return localVarApiClient.execute(localVarCall); } /** * Delete purchase order by ID (asynchronously) * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * @param orderId ID of the order that needs to be deleted (required) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call deleteOrderAsync(String orderId, final ApiCallback callback) throws ApiException { + public okhttp3.Call deleteOrderAsync(String orderId, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = deleteOrderValidateBeforeCall(orderId, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; + okhttp3.Call localVarCall = deleteOrderValidateBeforeCall(orderId, _progressListener, _progressRequestListener); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; } /** * Build call for getInventory - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener + * @param _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = new Object(); // create path and map variables @@ -192,7 +192,7 @@ public class StoreApi { final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -200,31 +200,31 @@ public class StoreApi { final String[] localVarContentTypes = { }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { "api_key" }; - return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @SuppressWarnings("rawtypes") - private okhttp3.Call getInventoryValidateBeforeCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private okhttp3.Call getInventoryValidateBeforeCall(final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { - okhttp3.Call call = getInventoryCall(progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = getInventoryCall(_progressListener, _progressRequestListener); + return localVarCall; } @@ -235,8 +235,8 @@ public class StoreApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Map getInventory() throws ApiException { - ApiResponse> resp = getInventoryWithHttpInfo(); - return resp.getData(); + ApiResponse> localVarResp = getInventoryWithHttpInfo(); + return localVarResp.getData(); } /** @@ -246,58 +246,58 @@ public class StoreApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse> getInventoryWithHttpInfo() throws ApiException { - okhttp3.Call call = getInventoryValidateBeforeCall(null, null); + okhttp3.Call localVarCall = getInventoryValidateBeforeCall(null, null); Type localVarReturnType = new TypeToken>(){}.getType(); - return apiClient.execute(call, localVarReturnType); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Returns pet inventories by status (asynchronously) * Returns a map of status codes to quantities - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call getInventoryAsync(final ApiCallback> callback) throws ApiException { + public okhttp3.Call getInventoryAsync(final ApiCallback> _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = getInventoryValidateBeforeCall(progressListener, progressRequestListener); + okhttp3.Call localVarCall = getInventoryValidateBeforeCall(_progressListener, _progressRequestListener); Type localVarReturnType = new TypeToken>(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; } /** * 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 _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/store/order/{order_id}" - .replaceAll("\\{" + "order_id" + "\\}", apiClient.escapeString(orderId.toString())); + .replaceAll("\\{" + "order_id" + "\\}", localVarApiClient.escapeString(orderId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -306,7 +306,7 @@ public class StoreApi { final String[] localVarAccepts = { "application/xml", "application/json" }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -314,27 +314,27 @@ public class StoreApi { final String[] localVarContentTypes = { }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'orderId' is set if (orderId == null) { @@ -342,8 +342,8 @@ public class StoreApi { } - okhttp3.Call call = getOrderByIdCall(orderId, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = getOrderByIdCall(orderId, _progressListener, _progressRequestListener); + return localVarCall; } @@ -355,8 +355,8 @@ public class StoreApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Order getOrderById(Long orderId) throws ApiException { - ApiResponse resp = getOrderByIdWithHttpInfo(orderId); - return resp.getData(); + ApiResponse localVarResp = getOrderByIdWithHttpInfo(orderId); + return localVarResp.getData(); } /** @@ -367,54 +367,54 @@ public class StoreApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse getOrderByIdWithHttpInfo(Long orderId) throws ApiException { - okhttp3.Call call = getOrderByIdValidateBeforeCall(orderId, null, null); + okhttp3.Call localVarCall = getOrderByIdValidateBeforeCall(orderId, null, null); Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Find purchase order by ID (asynchronously) * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions * @param orderId ID of pet that needs to be fetched (required) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call getOrderByIdAsync(Long orderId, final ApiCallback callback) throws ApiException { + public okhttp3.Call getOrderByIdAsync(Long orderId, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = getOrderByIdValidateBeforeCall(orderId, progressListener, progressRequestListener); + okhttp3.Call localVarCall = getOrderByIdValidateBeforeCall(orderId, _progressListener, _progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; } /** * Build call for placeOrder * @param body order placed for purchasing the pet (required) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener + * @param _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = body; // create path and map variables @@ -427,7 +427,7 @@ public class StoreApi { final String[] localVarAccepts = { "application/xml", "application/json" }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -435,27 +435,27 @@ public class StoreApi { final String[] localVarContentTypes = { }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'body' is set if (body == null) { @@ -463,8 +463,8 @@ public class StoreApi { } - okhttp3.Call call = placeOrderCall(body, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = placeOrderCall(body, _progressListener, _progressRequestListener); + return localVarCall; } @@ -476,8 +476,8 @@ public class StoreApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Order placeOrder(Order body) throws ApiException { - ApiResponse resp = placeOrderWithHttpInfo(body); - return resp.getData(); + ApiResponse localVarResp = placeOrderWithHttpInfo(body); + return localVarResp.getData(); } /** @@ -488,43 +488,43 @@ public class StoreApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse placeOrderWithHttpInfo(Order body) throws ApiException { - okhttp3.Call call = placeOrderValidateBeforeCall(body, null, null); + okhttp3.Call localVarCall = placeOrderValidateBeforeCall(body, null, null); Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Place an order for a pet (asynchronously) * * @param body order placed for purchasing the pet (required) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call placeOrderAsync(Order body, final ApiCallback callback) throws ApiException { + public okhttp3.Call placeOrderAsync(Order body, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = placeOrderValidateBeforeCall(body, progressListener, progressRequestListener); + okhttp3.Call localVarCall = placeOrderValidateBeforeCall(body, _progressListener, _progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; } } diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/UserApi.java index b7d298439a1..991cc2df4b7 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/UserApi.java @@ -36,33 +36,33 @@ import java.util.List; import java.util.Map; public class UserApi { - private ApiClient apiClient; + private ApiClient localVarApiClient; public UserApi() { this(Configuration.getDefaultApiClient()); } public UserApi(ApiClient apiClient) { - this.apiClient = apiClient; + this.localVarApiClient = apiClient; } public ApiClient getApiClient() { - return apiClient; + return localVarApiClient; } public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; + this.localVarApiClient = apiClient; } /** * Build call for createUser * @param body Created user object (required) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener + * @param _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = body; // create path and map variables @@ -75,7 +75,7 @@ public class UserApi { final String[] localVarAccepts = { }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -83,27 +83,27 @@ public class UserApi { final String[] localVarContentTypes = { }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'body' is set if (body == null) { @@ -111,8 +111,8 @@ public class UserApi { } - okhttp3.Call call = createUserCall(body, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = createUserCall(body, _progressListener, _progressRequestListener); + return localVarCall; } @@ -134,52 +134,52 @@ public class UserApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse createUserWithHttpInfo(User body) throws ApiException { - okhttp3.Call call = createUserValidateBeforeCall(body, null, null); - return apiClient.execute(call); + okhttp3.Call localVarCall = createUserValidateBeforeCall(body, null, null); + return localVarApiClient.execute(localVarCall); } /** * Create user (asynchronously) * This can only be done by the logged in user. * @param body Created user object (required) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call createUserAsync(User body, final ApiCallback callback) throws ApiException { + public okhttp3.Call createUserAsync(User body, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = createUserValidateBeforeCall(body, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; + okhttp3.Call localVarCall = createUserValidateBeforeCall(body, _progressListener, _progressRequestListener); + 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 _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public okhttp3.Call createUsersWithArrayInputCall(List body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public okhttp3.Call createUsersWithArrayInputCall(List body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = body; // create path and map variables @@ -192,7 +192,7 @@ public class UserApi { final String[] localVarAccepts = { }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -200,27 +200,27 @@ public class UserApi { final String[] localVarContentTypes = { }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @SuppressWarnings("rawtypes") - private okhttp3.Call createUsersWithArrayInputValidateBeforeCall(List body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private okhttp3.Call createUsersWithArrayInputValidateBeforeCall(List body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'body' is set if (body == null) { @@ -228,8 +228,8 @@ public class UserApi { } - okhttp3.Call call = createUsersWithArrayInputCall(body, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = createUsersWithArrayInputCall(body, _progressListener, _progressRequestListener); + return localVarCall; } @@ -251,52 +251,52 @@ public class UserApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse createUsersWithArrayInputWithHttpInfo(List body) throws ApiException { - okhttp3.Call call = createUsersWithArrayInputValidateBeforeCall(body, null, null); - return apiClient.execute(call); + okhttp3.Call localVarCall = createUsersWithArrayInputValidateBeforeCall(body, null, null); + return localVarApiClient.execute(localVarCall); } /** * Creates list of users with given input array (asynchronously) * * @param body List of user object (required) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call createUsersWithArrayInputAsync(List body, final ApiCallback callback) throws ApiException { + public okhttp3.Call createUsersWithArrayInputAsync(List body, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = createUsersWithArrayInputValidateBeforeCall(body, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; + okhttp3.Call localVarCall = createUsersWithArrayInputValidateBeforeCall(body, _progressListener, _progressRequestListener); + 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 _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public okhttp3.Call createUsersWithListInputCall(List body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public okhttp3.Call createUsersWithListInputCall(List body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = body; // create path and map variables @@ -309,7 +309,7 @@ public class UserApi { final String[] localVarAccepts = { }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -317,27 +317,27 @@ public class UserApi { final String[] localVarContentTypes = { }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @SuppressWarnings("rawtypes") - private okhttp3.Call createUsersWithListInputValidateBeforeCall(List body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private okhttp3.Call createUsersWithListInputValidateBeforeCall(List body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'body' is set if (body == null) { @@ -345,8 +345,8 @@ public class UserApi { } - okhttp3.Call call = createUsersWithListInputCall(body, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = createUsersWithListInputCall(body, _progressListener, _progressRequestListener); + return localVarCall; } @@ -368,57 +368,57 @@ public class UserApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse createUsersWithListInputWithHttpInfo(List body) throws ApiException { - okhttp3.Call call = createUsersWithListInputValidateBeforeCall(body, null, null); - return apiClient.execute(call); + okhttp3.Call localVarCall = createUsersWithListInputValidateBeforeCall(body, null, null); + return localVarApiClient.execute(localVarCall); } /** * Creates list of users with given input array (asynchronously) * * @param body List of user object (required) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call createUsersWithListInputAsync(List body, final ApiCallback callback) throws ApiException { + public okhttp3.Call createUsersWithListInputAsync(List body, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = createUsersWithListInputValidateBeforeCall(body, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; + okhttp3.Call localVarCall = createUsersWithListInputValidateBeforeCall(body, _progressListener, _progressRequestListener); + 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 _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/user/{username}" - .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); + .replaceAll("\\{" + "username" + "\\}", localVarApiClient.escapeString(username.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -427,7 +427,7 @@ public class UserApi { final String[] localVarAccepts = { }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -435,27 +435,27 @@ public class UserApi { final String[] localVarContentTypes = { }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'username' is set if (username == null) { @@ -463,8 +463,8 @@ public class UserApi { } - okhttp3.Call call = deleteUserCall(username, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = deleteUserCall(username, _progressListener, _progressRequestListener); + return localVarCall; } @@ -486,57 +486,57 @@ public class UserApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse deleteUserWithHttpInfo(String username) throws ApiException { - okhttp3.Call call = deleteUserValidateBeforeCall(username, null, null); - return apiClient.execute(call); + okhttp3.Call localVarCall = deleteUserValidateBeforeCall(username, null, null); + return localVarApiClient.execute(localVarCall); } /** * Delete user (asynchronously) * This can only be done by the logged in user. * @param username The name that needs to be deleted (required) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call deleteUserAsync(String username, final ApiCallback callback) throws ApiException { + public okhttp3.Call deleteUserAsync(String username, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = deleteUserValidateBeforeCall(username, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; + okhttp3.Call localVarCall = deleteUserValidateBeforeCall(username, _progressListener, _progressRequestListener); + 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 _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/user/{username}" - .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); + .replaceAll("\\{" + "username" + "\\}", localVarApiClient.escapeString(username.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -545,7 +545,7 @@ public class UserApi { final String[] localVarAccepts = { "application/xml", "application/json" }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -553,27 +553,27 @@ public class UserApi { final String[] localVarContentTypes = { }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'username' is set if (username == null) { @@ -581,8 +581,8 @@ public class UserApi { } - okhttp3.Call call = getUserByNameCall(username, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = getUserByNameCall(username, _progressListener, _progressRequestListener); + return localVarCall; } @@ -594,8 +594,8 @@ public class UserApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public User getUserByName(String username) throws ApiException { - ApiResponse resp = getUserByNameWithHttpInfo(username); - return resp.getData(); + ApiResponse localVarResp = getUserByNameWithHttpInfo(username); + return localVarResp.getData(); } /** @@ -606,55 +606,55 @@ public class UserApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse getUserByNameWithHttpInfo(String username) throws ApiException { - okhttp3.Call call = getUserByNameValidateBeforeCall(username, null, null); + okhttp3.Call localVarCall = getUserByNameValidateBeforeCall(username, null, null); Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get user by user name (asynchronously) * * @param username The name that needs to be fetched. Use user1 for testing. (required) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call getUserByNameAsync(String username, final ApiCallback callback) throws ApiException { + public okhttp3.Call getUserByNameAsync(String username, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = getUserByNameValidateBeforeCall(username, progressListener, progressRequestListener); + okhttp3.Call localVarCall = getUserByNameValidateBeforeCall(username, _progressListener, _progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; } /** * 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 _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = new Object(); // create path and map variables @@ -663,11 +663,11 @@ public class UserApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); if (username != null) { - localVarQueryParams.addAll(apiClient.parameterToPair("username", username)); + localVarQueryParams.addAll(localVarApiClient.parameterToPair("username", username)); } if (password != null) { - localVarQueryParams.addAll(apiClient.parameterToPair("password", password)); + localVarQueryParams.addAll(localVarApiClient.parameterToPair("password", password)); } Map localVarHeaderParams = new HashMap(); @@ -675,7 +675,7 @@ public class UserApi { final String[] localVarAccepts = { "application/xml", "application/json" }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -683,27 +683,27 @@ public class UserApi { final String[] localVarContentTypes = { }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'username' is set if (username == null) { @@ -716,8 +716,8 @@ public class UserApi { } - okhttp3.Call call = loginUserCall(username, password, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = loginUserCall(username, password, _progressListener, _progressRequestListener); + return localVarCall; } @@ -730,8 +730,8 @@ public class UserApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public String loginUser(String username, String password) throws ApiException { - ApiResponse resp = loginUserWithHttpInfo(username, password); - return resp.getData(); + ApiResponse localVarResp = loginUserWithHttpInfo(username, password); + return localVarResp.getData(); } /** @@ -743,9 +743,9 @@ public class UserApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse loginUserWithHttpInfo(String username, String password) throws ApiException { - okhttp3.Call call = loginUserValidateBeforeCall(username, password, null, null); + okhttp3.Call localVarCall = loginUserValidateBeforeCall(username, password, null, null); Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** @@ -753,44 +753,44 @@ public class UserApi { * * @param username The user name for login (required) * @param password The password for login in clear text (required) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call loginUserAsync(String username, String password, final ApiCallback callback) throws ApiException { + public okhttp3.Call loginUserAsync(String username, String password, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = loginUserValidateBeforeCall(username, password, progressListener, progressRequestListener); + okhttp3.Call localVarCall = loginUserValidateBeforeCall(username, password, _progressListener, _progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; } /** * Build call for logoutUser - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener + * @param _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = new Object(); // create path and map variables @@ -803,7 +803,7 @@ public class UserApi { final String[] localVarAccepts = { }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -811,31 +811,31 @@ public class UserApi { final String[] localVarContentTypes = { }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @SuppressWarnings("rawtypes") - private okhttp3.Call logoutUserValidateBeforeCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private okhttp3.Call logoutUserValidateBeforeCall(final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { - okhttp3.Call call = logoutUserCall(progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = logoutUserCall(_progressListener, _progressRequestListener); + return localVarCall; } @@ -855,57 +855,57 @@ public class UserApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse logoutUserWithHttpInfo() throws ApiException { - okhttp3.Call call = logoutUserValidateBeforeCall(null, null); - return apiClient.execute(call); + okhttp3.Call localVarCall = logoutUserValidateBeforeCall(null, null); + return localVarApiClient.execute(localVarCall); } /** * Logs out current logged in user session (asynchronously) * - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call logoutUserAsync(final ApiCallback callback) throws ApiException { + public okhttp3.Call logoutUserAsync(final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = logoutUserValidateBeforeCall(progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; + okhttp3.Call localVarCall = logoutUserValidateBeforeCall(_progressListener, _progressRequestListener); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; } /** * 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 _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = body; // create path and map variables String localVarPath = "/user/{username}" - .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); + .replaceAll("\\{" + "username" + "\\}", localVarApiClient.escapeString(username.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -914,7 +914,7 @@ public class UserApi { final String[] localVarAccepts = { }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -922,27 +922,27 @@ public class UserApi { final String[] localVarContentTypes = { }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'username' is set if (username == null) { @@ -955,8 +955,8 @@ public class UserApi { } - okhttp3.Call call = updateUserCall(username, body, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = updateUserCall(username, body, _progressListener, _progressRequestListener); + return localVarCall; } @@ -980,8 +980,8 @@ public class UserApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse updateUserWithHttpInfo(String username, User body) throws ApiException { - okhttp3.Call call = updateUserValidateBeforeCall(username, body, null, null); - return apiClient.execute(call); + okhttp3.Call localVarCall = updateUserValidateBeforeCall(username, body, null, null); + return localVarApiClient.execute(localVarCall); } /** @@ -989,33 +989,33 @@ public class UserApi { * This can only be done by the logged in user. * @param username name that need to be deleted (required) * @param body Updated user object (required) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call updateUserAsync(String username, User body, final ApiCallback callback) throws ApiException { + public okhttp3.Call updateUserAsync(String username, User body, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = updateUserValidateBeforeCall(username, body, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; + okhttp3.Call localVarCall = updateUserValidateBeforeCall(username, body, _progressListener, _progressRequestListener); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; } } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index d02dc58bf2d..49f4e834540 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -36,33 +36,33 @@ import java.util.List; import java.util.Map; public class AnotherFakeApi { - private ApiClient apiClient; + private ApiClient localVarApiClient; public AnotherFakeApi() { this(Configuration.getDefaultApiClient()); } public AnotherFakeApi(ApiClient apiClient) { - this.apiClient = apiClient; + this.localVarApiClient = apiClient; } public ApiClient getApiClient() { - return apiClient; + return localVarApiClient; } public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; + this.localVarApiClient = apiClient; } /** * Build call for call123testSpecialTags * @param body client model (required) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener + * @param _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = body; // create path and map variables @@ -75,7 +75,7 @@ public class AnotherFakeApi { final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -83,27 +83,27 @@ public class AnotherFakeApi { final String[] localVarContentTypes = { "application/json" }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'body' is set if (body == null) { @@ -111,8 +111,8 @@ public class AnotherFakeApi { } - okhttp3.Call call = call123testSpecialTagsCall(body, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = call123testSpecialTagsCall(body, _progressListener, _progressRequestListener); + return localVarCall; } @@ -124,8 +124,8 @@ public class AnotherFakeApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Client call123testSpecialTags(Client body) throws ApiException { - ApiResponse resp = call123testSpecialTagsWithHttpInfo(body); - return resp.getData(); + ApiResponse localVarResp = call123testSpecialTagsWithHttpInfo(body); + return localVarResp.getData(); } /** @@ -136,43 +136,43 @@ public class AnotherFakeApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse call123testSpecialTagsWithHttpInfo(Client body) throws ApiException { - okhttp3.Call call = call123testSpecialTagsValidateBeforeCall(body, null, null); + okhttp3.Call localVarCall = call123testSpecialTagsValidateBeforeCall(body, null, null); Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * To test special tags (asynchronously) * To test special tags and operation ID starting with number * @param body client model (required) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call call123testSpecialTagsAsync(Client body, final ApiCallback callback) throws ApiException { + public okhttp3.Call call123testSpecialTagsAsync(Client body, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = call123testSpecialTagsValidateBeforeCall(body, progressListener, progressRequestListener); + okhttp3.Call localVarCall = call123testSpecialTagsValidateBeforeCall(body, _progressListener, _progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; } } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeApi.java index 08aef7f973b..d1fcd2043e4 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeApi.java @@ -44,33 +44,33 @@ import java.util.List; import java.util.Map; public class FakeApi { - private ApiClient apiClient; + private ApiClient localVarApiClient; public FakeApi() { this(Configuration.getDefaultApiClient()); } public FakeApi(ApiClient apiClient) { - this.apiClient = apiClient; + this.localVarApiClient = apiClient; } public ApiClient getApiClient() { - return apiClient; + return localVarApiClient; } public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; + this.localVarApiClient = apiClient; } /** * Build call for createXmlItem * @param xmlItem XmlItem Body (required) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener + * @param _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public okhttp3.Call createXmlItemCall(XmlItem xmlItem, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public okhttp3.Call createXmlItemCall(XmlItem xmlItem, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = xmlItem; // create path and map variables @@ -83,7 +83,7 @@ public class FakeApi { final String[] localVarAccepts = { }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -91,27 +91,27 @@ public class FakeApi { final String[] localVarContentTypes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @SuppressWarnings("rawtypes") - private okhttp3.Call createXmlItemValidateBeforeCall(XmlItem xmlItem, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private okhttp3.Call createXmlItemValidateBeforeCall(XmlItem xmlItem, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'xmlItem' is set if (xmlItem == null) { @@ -119,8 +119,8 @@ public class FakeApi { } - okhttp3.Call call = createXmlItemCall(xmlItem, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = createXmlItemCall(xmlItem, _progressListener, _progressRequestListener); + return localVarCall; } @@ -142,52 +142,52 @@ public class FakeApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse createXmlItemWithHttpInfo(XmlItem xmlItem) throws ApiException { - okhttp3.Call call = createXmlItemValidateBeforeCall(xmlItem, null, null); - return apiClient.execute(call); + okhttp3.Call localVarCall = createXmlItemValidateBeforeCall(xmlItem, null, null); + return localVarApiClient.execute(localVarCall); } /** * creates an XmlItem (asynchronously) * this route creates an XmlItem * @param xmlItem XmlItem Body (required) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call createXmlItemAsync(XmlItem xmlItem, final ApiCallback callback) throws ApiException { + public okhttp3.Call createXmlItemAsync(XmlItem xmlItem, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = createXmlItemValidateBeforeCall(xmlItem, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; + okhttp3.Call localVarCall = createXmlItemValidateBeforeCall(xmlItem, _progressListener, _progressRequestListener); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; } /** * Build call for fakeOuterBooleanSerialize * @param body Input boolean as post body (optional) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener + * @param _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public okhttp3.Call fakeOuterBooleanSerializeCall(Boolean body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public okhttp3.Call fakeOuterBooleanSerializeCall(Boolean body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = body; // create path and map variables @@ -200,7 +200,7 @@ public class FakeApi { final String[] localVarAccepts = { "*/*" }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -208,31 +208,31 @@ public class FakeApi { final String[] localVarContentTypes = { }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @SuppressWarnings("rawtypes") - private okhttp3.Call fakeOuterBooleanSerializeValidateBeforeCall(Boolean body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private okhttp3.Call fakeOuterBooleanSerializeValidateBeforeCall(Boolean body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { - okhttp3.Call call = fakeOuterBooleanSerializeCall(body, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = fakeOuterBooleanSerializeCall(body, _progressListener, _progressRequestListener); + return localVarCall; } @@ -244,8 +244,8 @@ public class FakeApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Boolean fakeOuterBooleanSerialize(Boolean body) throws ApiException { - ApiResponse resp = fakeOuterBooleanSerializeWithHttpInfo(body); - return resp.getData(); + ApiResponse localVarResp = fakeOuterBooleanSerializeWithHttpInfo(body); + return localVarResp.getData(); } /** @@ -256,54 +256,54 @@ public class FakeApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse fakeOuterBooleanSerializeWithHttpInfo(Boolean body) throws ApiException { - okhttp3.Call call = fakeOuterBooleanSerializeValidateBeforeCall(body, null, null); + okhttp3.Call localVarCall = fakeOuterBooleanSerializeValidateBeforeCall(body, null, null); Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) * Test serialization of outer boolean types * @param body Input boolean as post body (optional) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call fakeOuterBooleanSerializeAsync(Boolean body, final ApiCallback callback) throws ApiException { + public okhttp3.Call fakeOuterBooleanSerializeAsync(Boolean body, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = fakeOuterBooleanSerializeValidateBeforeCall(body, progressListener, progressRequestListener); + okhttp3.Call localVarCall = fakeOuterBooleanSerializeValidateBeforeCall(body, _progressListener, _progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; } /** * Build call for fakeOuterCompositeSerialize * @param body Input composite as post body (optional) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener + * @param _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public okhttp3.Call fakeOuterCompositeSerializeCall(OuterComposite body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public okhttp3.Call fakeOuterCompositeSerializeCall(OuterComposite body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = body; // create path and map variables @@ -316,7 +316,7 @@ public class FakeApi { final String[] localVarAccepts = { "*/*" }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -324,31 +324,31 @@ public class FakeApi { final String[] localVarContentTypes = { }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @SuppressWarnings("rawtypes") - private okhttp3.Call fakeOuterCompositeSerializeValidateBeforeCall(OuterComposite body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private okhttp3.Call fakeOuterCompositeSerializeValidateBeforeCall(OuterComposite body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { - okhttp3.Call call = fakeOuterCompositeSerializeCall(body, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = fakeOuterCompositeSerializeCall(body, _progressListener, _progressRequestListener); + return localVarCall; } @@ -360,8 +360,8 @@ public class FakeApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public OuterComposite fakeOuterCompositeSerialize(OuterComposite body) throws ApiException { - ApiResponse resp = fakeOuterCompositeSerializeWithHttpInfo(body); - return resp.getData(); + ApiResponse localVarResp = fakeOuterCompositeSerializeWithHttpInfo(body); + return localVarResp.getData(); } /** @@ -372,54 +372,54 @@ public class FakeApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse fakeOuterCompositeSerializeWithHttpInfo(OuterComposite body) throws ApiException { - okhttp3.Call call = fakeOuterCompositeSerializeValidateBeforeCall(body, null, null); + okhttp3.Call localVarCall = fakeOuterCompositeSerializeValidateBeforeCall(body, null, null); Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) * Test serialization of object with outer number type * @param body Input composite as post body (optional) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call fakeOuterCompositeSerializeAsync(OuterComposite body, final ApiCallback callback) throws ApiException { + public okhttp3.Call fakeOuterCompositeSerializeAsync(OuterComposite body, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = fakeOuterCompositeSerializeValidateBeforeCall(body, progressListener, progressRequestListener); + okhttp3.Call localVarCall = fakeOuterCompositeSerializeValidateBeforeCall(body, _progressListener, _progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; } /** * Build call for fakeOuterNumberSerialize * @param body Input number as post body (optional) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener + * @param _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public okhttp3.Call fakeOuterNumberSerializeCall(BigDecimal body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public okhttp3.Call fakeOuterNumberSerializeCall(BigDecimal body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = body; // create path and map variables @@ -432,7 +432,7 @@ public class FakeApi { final String[] localVarAccepts = { "*/*" }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -440,31 +440,31 @@ public class FakeApi { final String[] localVarContentTypes = { }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @SuppressWarnings("rawtypes") - private okhttp3.Call fakeOuterNumberSerializeValidateBeforeCall(BigDecimal body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private okhttp3.Call fakeOuterNumberSerializeValidateBeforeCall(BigDecimal body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { - okhttp3.Call call = fakeOuterNumberSerializeCall(body, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = fakeOuterNumberSerializeCall(body, _progressListener, _progressRequestListener); + return localVarCall; } @@ -476,8 +476,8 @@ public class FakeApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public BigDecimal fakeOuterNumberSerialize(BigDecimal body) throws ApiException { - ApiResponse resp = fakeOuterNumberSerializeWithHttpInfo(body); - return resp.getData(); + ApiResponse localVarResp = fakeOuterNumberSerializeWithHttpInfo(body); + return localVarResp.getData(); } /** @@ -488,54 +488,54 @@ public class FakeApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse fakeOuterNumberSerializeWithHttpInfo(BigDecimal body) throws ApiException { - okhttp3.Call call = fakeOuterNumberSerializeValidateBeforeCall(body, null, null); + okhttp3.Call localVarCall = fakeOuterNumberSerializeValidateBeforeCall(body, null, null); Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) * Test serialization of outer number types * @param body Input number as post body (optional) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call fakeOuterNumberSerializeAsync(BigDecimal body, final ApiCallback callback) throws ApiException { + public okhttp3.Call fakeOuterNumberSerializeAsync(BigDecimal body, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = fakeOuterNumberSerializeValidateBeforeCall(body, progressListener, progressRequestListener); + okhttp3.Call localVarCall = fakeOuterNumberSerializeValidateBeforeCall(body, _progressListener, _progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; } /** * Build call for fakeOuterStringSerialize * @param body Input string as post body (optional) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener + * @param _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public okhttp3.Call fakeOuterStringSerializeCall(String body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public okhttp3.Call fakeOuterStringSerializeCall(String body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = body; // create path and map variables @@ -548,7 +548,7 @@ public class FakeApi { final String[] localVarAccepts = { "*/*" }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -556,31 +556,31 @@ public class FakeApi { final String[] localVarContentTypes = { }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @SuppressWarnings("rawtypes") - private okhttp3.Call fakeOuterStringSerializeValidateBeforeCall(String body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private okhttp3.Call fakeOuterStringSerializeValidateBeforeCall(String body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { - okhttp3.Call call = fakeOuterStringSerializeCall(body, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = fakeOuterStringSerializeCall(body, _progressListener, _progressRequestListener); + return localVarCall; } @@ -592,8 +592,8 @@ public class FakeApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public String fakeOuterStringSerialize(String body) throws ApiException { - ApiResponse resp = fakeOuterStringSerializeWithHttpInfo(body); - return resp.getData(); + ApiResponse localVarResp = fakeOuterStringSerializeWithHttpInfo(body); + return localVarResp.getData(); } /** @@ -604,54 +604,54 @@ public class FakeApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse fakeOuterStringSerializeWithHttpInfo(String body) throws ApiException { - okhttp3.Call call = fakeOuterStringSerializeValidateBeforeCall(body, null, null); + okhttp3.Call localVarCall = fakeOuterStringSerializeValidateBeforeCall(body, null, null); Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) * Test serialization of outer string types * @param body Input string as post body (optional) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call fakeOuterStringSerializeAsync(String body, final ApiCallback callback) throws ApiException { + public okhttp3.Call fakeOuterStringSerializeAsync(String body, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = fakeOuterStringSerializeValidateBeforeCall(body, progressListener, progressRequestListener); + okhttp3.Call localVarCall = fakeOuterStringSerializeValidateBeforeCall(body, _progressListener, _progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; } /** * Build call for testBodyWithFileSchema * @param body (required) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener + * @param _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public okhttp3.Call testBodyWithFileSchemaCall(FileSchemaTestClass body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public okhttp3.Call testBodyWithFileSchemaCall(FileSchemaTestClass body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = body; // create path and map variables @@ -664,7 +664,7 @@ public class FakeApi { final String[] localVarAccepts = { }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -672,27 +672,27 @@ public class FakeApi { final String[] localVarContentTypes = { "application/json" }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @SuppressWarnings("rawtypes") - private okhttp3.Call testBodyWithFileSchemaValidateBeforeCall(FileSchemaTestClass body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private okhttp3.Call testBodyWithFileSchemaValidateBeforeCall(FileSchemaTestClass body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'body' is set if (body == null) { @@ -700,8 +700,8 @@ public class FakeApi { } - okhttp3.Call call = testBodyWithFileSchemaCall(body, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = testBodyWithFileSchemaCall(body, _progressListener, _progressRequestListener); + return localVarCall; } @@ -723,53 +723,53 @@ public class FakeApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass body) throws ApiException { - okhttp3.Call call = testBodyWithFileSchemaValidateBeforeCall(body, null, null); - return apiClient.execute(call); + okhttp3.Call localVarCall = testBodyWithFileSchemaValidateBeforeCall(body, null, null); + return localVarApiClient.execute(localVarCall); } /** * (asynchronously) * For this test, the body for this request much reference a schema named `File`. * @param body (required) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call testBodyWithFileSchemaAsync(FileSchemaTestClass body, final ApiCallback callback) throws ApiException { + public okhttp3.Call testBodyWithFileSchemaAsync(FileSchemaTestClass body, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = testBodyWithFileSchemaValidateBeforeCall(body, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; + okhttp3.Call localVarCall = testBodyWithFileSchemaValidateBeforeCall(body, _progressListener, _progressRequestListener); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; } /** * Build call for testBodyWithQueryParams * @param query (required) * @param body (required) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener + * @param _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public okhttp3.Call testBodyWithQueryParamsCall(String query, User body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public okhttp3.Call testBodyWithQueryParamsCall(String query, User body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = body; // create path and map variables @@ -778,7 +778,7 @@ public class FakeApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); if (query != null) { - localVarQueryParams.addAll(apiClient.parameterToPair("query", query)); + localVarQueryParams.addAll(localVarApiClient.parameterToPair("query", query)); } Map localVarHeaderParams = new HashMap(); @@ -786,7 +786,7 @@ public class FakeApi { final String[] localVarAccepts = { }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -794,27 +794,27 @@ public class FakeApi { final String[] localVarContentTypes = { "application/json" }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @SuppressWarnings("rawtypes") - private okhttp3.Call testBodyWithQueryParamsValidateBeforeCall(String query, User body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private okhttp3.Call testBodyWithQueryParamsValidateBeforeCall(String query, User body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'query' is set if (query == null) { @@ -827,8 +827,8 @@ public class FakeApi { } - okhttp3.Call call = testBodyWithQueryParamsCall(query, body, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = testBodyWithQueryParamsCall(query, body, _progressListener, _progressRequestListener); + return localVarCall; } @@ -852,8 +852,8 @@ public class FakeApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse testBodyWithQueryParamsWithHttpInfo(String query, User body) throws ApiException { - okhttp3.Call call = testBodyWithQueryParamsValidateBeforeCall(query, body, null, null); - return apiClient.execute(call); + okhttp3.Call localVarCall = testBodyWithQueryParamsValidateBeforeCall(query, body, null, null); + return localVarApiClient.execute(localVarCall); } /** @@ -861,44 +861,44 @@ public class FakeApi { * * @param query (required) * @param body (required) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call testBodyWithQueryParamsAsync(String query, User body, final ApiCallback callback) throws ApiException { + public okhttp3.Call testBodyWithQueryParamsAsync(String query, User body, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = testBodyWithQueryParamsValidateBeforeCall(query, body, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; + okhttp3.Call localVarCall = testBodyWithQueryParamsValidateBeforeCall(query, body, _progressListener, _progressRequestListener); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; } /** * Build call for testClientModel * @param body client model (required) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener + * @param _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public okhttp3.Call testClientModelCall(Client body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public okhttp3.Call testClientModelCall(Client body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = body; // create path and map variables @@ -911,7 +911,7 @@ public class FakeApi { final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -919,27 +919,27 @@ public class FakeApi { final String[] localVarContentTypes = { "application/json" }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @SuppressWarnings("rawtypes") - private okhttp3.Call testClientModelValidateBeforeCall(Client body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private okhttp3.Call testClientModelValidateBeforeCall(Client body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'body' is set if (body == null) { @@ -947,8 +947,8 @@ public class FakeApi { } - okhttp3.Call call = testClientModelCall(body, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = testClientModelCall(body, _progressListener, _progressRequestListener); + return localVarCall; } @@ -960,8 +960,8 @@ public class FakeApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Client testClientModel(Client body) throws ApiException { - ApiResponse resp = testClientModelWithHttpInfo(body); - return resp.getData(); + ApiResponse localVarResp = testClientModelWithHttpInfo(body); + return localVarResp.getData(); } /** @@ -972,44 +972,44 @@ public class FakeApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse testClientModelWithHttpInfo(Client body) throws ApiException { - okhttp3.Call call = testClientModelValidateBeforeCall(body, null, null); + okhttp3.Call localVarCall = testClientModelValidateBeforeCall(body, null, null); Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * To test \"client\" model (asynchronously) * To test \"client\" model * @param body client model (required) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call testClientModelAsync(Client body, final ApiCallback callback) throws ApiException { + public okhttp3.Call testClientModelAsync(Client body, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = testClientModelValidateBeforeCall(body, progressListener, progressRequestListener); + okhttp3.Call localVarCall = testClientModelValidateBeforeCall(body, _progressListener, _progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; } /** * Build call for testEndpointParameters @@ -1027,12 +1027,12 @@ public class FakeApi { * @param dateTime None (optional) * @param password None (optional) * @param paramCallback None (optional) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener + * @param _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public okhttp3.Call testEndpointParametersCall(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public okhttp3.Call testEndpointParametersCall(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = new Object(); // create path and map variables @@ -1101,7 +1101,7 @@ public class FakeApi { final String[] localVarAccepts = { }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -1109,27 +1109,27 @@ public class FakeApi { final String[] localVarContentTypes = { "application/x-www-form-urlencoded" }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { "http_basic_test" }; - return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @SuppressWarnings("rawtypes") - private okhttp3.Call testEndpointParametersValidateBeforeCall(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private okhttp3.Call testEndpointParametersValidateBeforeCall(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'number' is set if (number == null) { @@ -1152,8 +1152,8 @@ public class FakeApi { } - okhttp3.Call call = testEndpointParametersCall(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = testEndpointParametersCall(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback, _progressListener, _progressRequestListener); + return localVarCall; } @@ -1201,8 +1201,8 @@ public class FakeApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse testEndpointParametersWithHttpInfo(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws ApiException { - okhttp3.Call call = testEndpointParametersValidateBeforeCall(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback, null, null); - return apiClient.execute(call); + okhttp3.Call localVarCall = testEndpointParametersValidateBeforeCall(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback, null, null); + return localVarApiClient.execute(localVarCall); } /** @@ -1222,34 +1222,34 @@ public class FakeApi { * @param dateTime None (optional) * @param password None (optional) * @param paramCallback None (optional) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call testEndpointParametersAsync(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback, final ApiCallback callback) throws ApiException { + public okhttp3.Call testEndpointParametersAsync(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = testEndpointParametersValidateBeforeCall(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; + okhttp3.Call localVarCall = testEndpointParametersValidateBeforeCall(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback, _progressListener, _progressRequestListener); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; } /** * Build call for testEnumParameters @@ -1261,12 +1261,12 @@ public class FakeApi { * @param enumQueryDouble Query parameter enum test (double) (optional) * @param enumFormStringArray Form parameter enum test (string array) (optional) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener + * @param _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public okhttp3.Call testEnumParametersCall(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public okhttp3.Call testEnumParametersCall(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = new Object(); // create path and map variables @@ -1275,28 +1275,28 @@ public class FakeApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); if (enumQueryStringArray != null) { - localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("csv", "enum_query_string_array", enumQueryStringArray)); + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "enum_query_string_array", enumQueryStringArray)); } if (enumQueryString != null) { - localVarQueryParams.addAll(apiClient.parameterToPair("enum_query_string", enumQueryString)); + localVarQueryParams.addAll(localVarApiClient.parameterToPair("enum_query_string", enumQueryString)); } if (enumQueryInteger != null) { - localVarQueryParams.addAll(apiClient.parameterToPair("enum_query_integer", enumQueryInteger)); + localVarQueryParams.addAll(localVarApiClient.parameterToPair("enum_query_integer", enumQueryInteger)); } if (enumQueryDouble != null) { - localVarQueryParams.addAll(apiClient.parameterToPair("enum_query_double", enumQueryDouble)); + localVarQueryParams.addAll(localVarApiClient.parameterToPair("enum_query_double", enumQueryDouble)); } Map localVarHeaderParams = new HashMap(); if (enumHeaderStringArray != null) { - localVarHeaderParams.put("enum_header_string_array", apiClient.parameterToString(enumHeaderStringArray)); + localVarHeaderParams.put("enum_header_string_array", localVarApiClient.parameterToString(enumHeaderStringArray)); } if (enumHeaderString != null) { - localVarHeaderParams.put("enum_header_string", apiClient.parameterToString(enumHeaderString)); + localVarHeaderParams.put("enum_header_string", localVarApiClient.parameterToString(enumHeaderString)); } Map localVarFormParams = new HashMap(); @@ -1311,7 +1311,7 @@ public class FakeApi { final String[] localVarAccepts = { }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -1319,31 +1319,31 @@ public class FakeApi { final String[] localVarContentTypes = { "application/x-www-form-urlencoded" }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @SuppressWarnings("rawtypes") - private okhttp3.Call testEnumParametersValidateBeforeCall(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private okhttp3.Call testEnumParametersValidateBeforeCall(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { - okhttp3.Call call = testEnumParametersCall(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = testEnumParametersCall(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, _progressListener, _progressRequestListener); + return localVarCall; } @@ -1379,8 +1379,8 @@ public class FakeApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse testEnumParametersWithHttpInfo(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws ApiException { - okhttp3.Call call = testEnumParametersValidateBeforeCall(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, null, null); - return apiClient.execute(call); + okhttp3.Call localVarCall = testEnumParametersValidateBeforeCall(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, null, null); + return localVarApiClient.execute(localVarCall); } /** @@ -1394,36 +1394,36 @@ public class FakeApi { * @param enumQueryDouble Query parameter enum test (double) (optional) * @param enumFormStringArray Form parameter enum test (string array) (optional) * @param enumFormString Form parameter enum test (string) (optional, default to -efg) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call testEnumParametersAsync(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString, final ApiCallback callback) throws ApiException { + public okhttp3.Call testEnumParametersAsync(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = testEnumParametersValidateBeforeCall(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; + okhttp3.Call localVarCall = testEnumParametersValidateBeforeCall(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, _progressListener, _progressRequestListener); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; } - private okhttp3.Call testGroupParametersCall(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private okhttp3.Call testGroupParametersCall(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = new Object(); // create path and map variables @@ -1432,35 +1432,35 @@ public class FakeApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); if (requiredStringGroup != null) { - localVarQueryParams.addAll(apiClient.parameterToPair("required_string_group", requiredStringGroup)); + localVarQueryParams.addAll(localVarApiClient.parameterToPair("required_string_group", requiredStringGroup)); } if (requiredInt64Group != null) { - localVarQueryParams.addAll(apiClient.parameterToPair("required_int64_group", requiredInt64Group)); + localVarQueryParams.addAll(localVarApiClient.parameterToPair("required_int64_group", requiredInt64Group)); } if (stringGroup != null) { - localVarQueryParams.addAll(apiClient.parameterToPair("string_group", stringGroup)); + localVarQueryParams.addAll(localVarApiClient.parameterToPair("string_group", stringGroup)); } if (int64Group != null) { - localVarQueryParams.addAll(apiClient.parameterToPair("int64_group", int64Group)); + localVarQueryParams.addAll(localVarApiClient.parameterToPair("int64_group", int64Group)); } Map localVarHeaderParams = new HashMap(); if (requiredBooleanGroup != null) { - localVarHeaderParams.put("required_boolean_group", apiClient.parameterToString(requiredBooleanGroup)); + localVarHeaderParams.put("required_boolean_group", localVarApiClient.parameterToString(requiredBooleanGroup)); } if (booleanGroup != null) { - localVarHeaderParams.put("boolean_group", apiClient.parameterToString(booleanGroup)); + localVarHeaderParams.put("boolean_group", localVarApiClient.parameterToString(booleanGroup)); } Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -1468,27 +1468,27 @@ public class FakeApi { final String[] localVarContentTypes = { }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @SuppressWarnings("rawtypes") - private okhttp3.Call testGroupParametersValidateBeforeCall(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private okhttp3.Call testGroupParametersValidateBeforeCall(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'requiredStringGroup' is set if (requiredStringGroup == null) { @@ -1506,41 +1506,41 @@ public class FakeApi { } - okhttp3.Call call = testGroupParametersCall(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = testGroupParametersCall(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, _progressListener, _progressRequestListener); + return localVarCall; } private ApiResponse testGroupParametersWithHttpInfo(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException { - okhttp3.Call call = testGroupParametersValidateBeforeCall(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, null, null); - return apiClient.execute(call); + okhttp3.Call localVarCall = testGroupParametersValidateBeforeCall(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, null, null); + return localVarApiClient.execute(localVarCall); } - private okhttp3.Call testGroupParametersAsync(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group, final ApiCallback callback) throws ApiException { + private okhttp3.Call testGroupParametersAsync(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = testGroupParametersValidateBeforeCall(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; + okhttp3.Call localVarCall = testGroupParametersValidateBeforeCall(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, _progressListener, _progressRequestListener); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; } public class APItestGroupParametersRequest { @@ -1589,13 +1589,13 @@ public class FakeApi { /** * Build call for testGroupParameters - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener + * @param _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public okhttp3.Call buildCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - return testGroupParametersCall(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, progressListener, progressRequestListener); + public okhttp3.Call buildCall(final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { + return testGroupParametersCall(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, _progressListener, _progressRequestListener); } /** @@ -1617,12 +1617,12 @@ public class FakeApi { /** * Execute testGroupParameters request (asynchronously) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call executeAsync(final ApiCallback callback) throws ApiException { - return testGroupParametersAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, callback); + public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { + return testGroupParametersAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, _callback); } } @@ -1640,12 +1640,12 @@ public class FakeApi { /** * Build call for testInlineAdditionalProperties * @param param request body (required) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener + * @param _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public okhttp3.Call testInlineAdditionalPropertiesCall(Map param, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public okhttp3.Call testInlineAdditionalPropertiesCall(Map param, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = param; // create path and map variables @@ -1658,7 +1658,7 @@ public class FakeApi { final String[] localVarAccepts = { }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -1666,27 +1666,27 @@ public class FakeApi { final String[] localVarContentTypes = { "application/json" }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @SuppressWarnings("rawtypes") - private okhttp3.Call testInlineAdditionalPropertiesValidateBeforeCall(Map param, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private okhttp3.Call testInlineAdditionalPropertiesValidateBeforeCall(Map param, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'param' is set if (param == null) { @@ -1694,8 +1694,8 @@ public class FakeApi { } - okhttp3.Call call = testInlineAdditionalPropertiesCall(param, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = testInlineAdditionalPropertiesCall(param, _progressListener, _progressRequestListener); + return localVarCall; } @@ -1717,53 +1717,53 @@ public class FakeApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse testInlineAdditionalPropertiesWithHttpInfo(Map param) throws ApiException { - okhttp3.Call call = testInlineAdditionalPropertiesValidateBeforeCall(param, null, null); - return apiClient.execute(call); + okhttp3.Call localVarCall = testInlineAdditionalPropertiesValidateBeforeCall(param, null, null); + return localVarApiClient.execute(localVarCall); } /** * test inline additionalProperties (asynchronously) * * @param param request body (required) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call testInlineAdditionalPropertiesAsync(Map param, final ApiCallback callback) throws ApiException { + public okhttp3.Call testInlineAdditionalPropertiesAsync(Map param, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = testInlineAdditionalPropertiesValidateBeforeCall(param, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; + okhttp3.Call localVarCall = testInlineAdditionalPropertiesValidateBeforeCall(param, _progressListener, _progressRequestListener); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; } /** * Build call for testJsonFormData * @param param field1 (required) * @param param2 field2 (required) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener + * @param _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public okhttp3.Call testJsonFormDataCall(String param, String param2, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public okhttp3.Call testJsonFormDataCall(String param, String param2, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = new Object(); // create path and map variables @@ -1784,7 +1784,7 @@ public class FakeApi { final String[] localVarAccepts = { }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -1792,27 +1792,27 @@ public class FakeApi { final String[] localVarContentTypes = { "application/x-www-form-urlencoded" }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @SuppressWarnings("rawtypes") - private okhttp3.Call testJsonFormDataValidateBeforeCall(String param, String param2, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private okhttp3.Call testJsonFormDataValidateBeforeCall(String param, String param2, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'param' is set if (param == null) { @@ -1825,8 +1825,8 @@ public class FakeApi { } - okhttp3.Call call = testJsonFormDataCall(param, param2, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = testJsonFormDataCall(param, param2, _progressListener, _progressRequestListener); + return localVarCall; } @@ -1850,8 +1850,8 @@ public class FakeApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse testJsonFormDataWithHttpInfo(String param, String param2) throws ApiException { - okhttp3.Call call = testJsonFormDataValidateBeforeCall(param, param2, null, null); - return apiClient.execute(call); + okhttp3.Call localVarCall = testJsonFormDataValidateBeforeCall(param, param2, null, null); + return localVarApiClient.execute(localVarCall); } /** @@ -1859,33 +1859,33 @@ public class FakeApi { * * @param param field1 (required) * @param param2 field2 (required) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call testJsonFormDataAsync(String param, String param2, final ApiCallback callback) throws ApiException { + public okhttp3.Call testJsonFormDataAsync(String param, String param2, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = testJsonFormDataValidateBeforeCall(param, param2, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; + okhttp3.Call localVarCall = testJsonFormDataValidateBeforeCall(param, param2, _progressListener, _progressRequestListener); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; } } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index 787906d9861..84adce504b5 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -36,33 +36,33 @@ import java.util.List; import java.util.Map; public class FakeClassnameTags123Api { - private ApiClient apiClient; + private ApiClient localVarApiClient; public FakeClassnameTags123Api() { this(Configuration.getDefaultApiClient()); } public FakeClassnameTags123Api(ApiClient apiClient) { - this.apiClient = apiClient; + this.localVarApiClient = apiClient; } public ApiClient getApiClient() { - return apiClient; + return localVarApiClient; } public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; + this.localVarApiClient = apiClient; } /** * Build call for testClassname * @param body client model (required) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener + * @param _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = body; // create path and map variables @@ -75,7 +75,7 @@ public class FakeClassnameTags123Api { final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -83,27 +83,27 @@ public class FakeClassnameTags123Api { final String[] localVarContentTypes = { "application/json" }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { "api_key_query" }; - return apiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'body' is set if (body == null) { @@ -111,8 +111,8 @@ public class FakeClassnameTags123Api { } - okhttp3.Call call = testClassnameCall(body, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = testClassnameCall(body, _progressListener, _progressRequestListener); + return localVarCall; } @@ -124,8 +124,8 @@ public class FakeClassnameTags123Api { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Client testClassname(Client body) throws ApiException { - ApiResponse resp = testClassnameWithHttpInfo(body); - return resp.getData(); + ApiResponse localVarResp = testClassnameWithHttpInfo(body); + return localVarResp.getData(); } /** @@ -136,43 +136,43 @@ public class FakeClassnameTags123Api { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse testClassnameWithHttpInfo(Client body) throws ApiException { - okhttp3.Call call = testClassnameValidateBeforeCall(body, null, null); + okhttp3.Call localVarCall = testClassnameValidateBeforeCall(body, null, null); Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * To test class name in snake case (asynchronously) * To test class name in snake case * @param body client model (required) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call testClassnameAsync(Client body, final ApiCallback callback) throws ApiException { + public okhttp3.Call testClassnameAsync(Client body, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = testClassnameValidateBeforeCall(body, progressListener, progressRequestListener); + okhttp3.Call localVarCall = testClassnameValidateBeforeCall(body, _progressListener, _progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; } } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/PetApi.java index aacd1af92b8..795640173ad 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/PetApi.java @@ -38,33 +38,33 @@ import java.util.List; import java.util.Map; public class PetApi { - private ApiClient apiClient; + private ApiClient localVarApiClient; public PetApi() { this(Configuration.getDefaultApiClient()); } public PetApi(ApiClient apiClient) { - this.apiClient = apiClient; + this.localVarApiClient = apiClient; } public ApiClient getApiClient() { - return apiClient; + return localVarApiClient; } public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; + this.localVarApiClient = apiClient; } /** * 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 _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = body; // create path and map variables @@ -77,7 +77,7 @@ public class PetApi { final String[] localVarAccepts = { }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -85,27 +85,27 @@ public class PetApi { final String[] localVarContentTypes = { "application/json", "application/xml" }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { "petstore_auth" }; - return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'body' is set if (body == null) { @@ -113,8 +113,8 @@ public class PetApi { } - okhttp3.Call call = addPetCall(body, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = addPetCall(body, _progressListener, _progressRequestListener); + return localVarCall; } @@ -136,71 +136,71 @@ public class PetApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse addPetWithHttpInfo(Pet body) throws ApiException { - okhttp3.Call call = addPetValidateBeforeCall(body, null, null); - return apiClient.execute(call); + okhttp3.Call localVarCall = addPetValidateBeforeCall(body, null, null); + return localVarApiClient.execute(localVarCall); } /** * Add a new pet to the store (asynchronously) * * @param body Pet object that needs to be added to the store (required) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call addPetAsync(Pet body, final ApiCallback callback) throws ApiException { + public okhttp3.Call addPetAsync(Pet body, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = addPetValidateBeforeCall(body, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; + okhttp3.Call localVarCall = addPetValidateBeforeCall(body, _progressListener, _progressRequestListener); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; } /** * Build call for deletePet * @param petId Pet id to delete (required) * @param apiKey (optional) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener + * @param _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/pet/{petId}" - .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); + .replaceAll("\\{" + "petId" + "\\}", localVarApiClient.escapeString(petId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); if (apiKey != null) { - localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey)); + localVarHeaderParams.put("api_key", localVarApiClient.parameterToString(apiKey)); } Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -208,27 +208,27 @@ public class PetApi { final String[] localVarContentTypes = { }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { "petstore_auth" }; - return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'petId' is set if (petId == null) { @@ -236,8 +236,8 @@ public class PetApi { } - okhttp3.Call call = deletePetCall(petId, apiKey, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = deletePetCall(petId, apiKey, _progressListener, _progressRequestListener); + return localVarCall; } @@ -261,8 +261,8 @@ public class PetApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse deletePetWithHttpInfo(Long petId, String apiKey) throws ApiException { - okhttp3.Call call = deletePetValidateBeforeCall(petId, apiKey, null, null); - return apiClient.execute(call); + okhttp3.Call localVarCall = deletePetValidateBeforeCall(petId, apiKey, null, null); + return localVarApiClient.execute(localVarCall); } /** @@ -270,44 +270,44 @@ public class PetApi { * * @param petId Pet id to delete (required) * @param apiKey (optional) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call deletePetAsync(Long petId, String apiKey, final ApiCallback callback) throws ApiException { + public okhttp3.Call deletePetAsync(Long petId, String apiKey, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = deletePetValidateBeforeCall(petId, apiKey, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; + okhttp3.Call localVarCall = deletePetValidateBeforeCall(petId, apiKey, _progressListener, _progressRequestListener); + 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 _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public okhttp3.Call findPetsByStatusCall(List status, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public okhttp3.Call findPetsByStatusCall(List status, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = new Object(); // create path and map variables @@ -316,7 +316,7 @@ public class PetApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); if (status != null) { - localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("csv", "status", status)); + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "status", status)); } Map localVarHeaderParams = new HashMap(); @@ -324,7 +324,7 @@ public class PetApi { final String[] localVarAccepts = { "application/xml", "application/json" }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -332,27 +332,27 @@ public class PetApi { final String[] localVarContentTypes = { }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { "petstore_auth" }; - return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @SuppressWarnings("rawtypes") - private okhttp3.Call findPetsByStatusValidateBeforeCall(List status, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private okhttp3.Call findPetsByStatusValidateBeforeCall(List status, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'status' is set if (status == null) { @@ -360,8 +360,8 @@ public class PetApi { } - okhttp3.Call call = findPetsByStatusCall(status, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = findPetsByStatusCall(status, _progressListener, _progressRequestListener); + return localVarCall; } @@ -373,8 +373,8 @@ public class PetApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public List findPetsByStatus(List status) throws ApiException { - ApiResponse> resp = findPetsByStatusWithHttpInfo(status); - return resp.getData(); + ApiResponse> localVarResp = findPetsByStatusWithHttpInfo(status); + return localVarResp.getData(); } /** @@ -385,56 +385,56 @@ public class PetApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse> findPetsByStatusWithHttpInfo(List status) throws ApiException { - okhttp3.Call call = findPetsByStatusValidateBeforeCall(status, null, null); + okhttp3.Call localVarCall = findPetsByStatusValidateBeforeCall(status, null, null); Type localVarReturnType = new TypeToken>(){}.getType(); - return apiClient.execute(call, localVarReturnType); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Finds Pets by status (asynchronously) * Multiple status values can be provided with comma separated strings * @param status Status values that need to be considered for filter (required) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call findPetsByStatusAsync(List status, final ApiCallback> callback) throws ApiException { + public okhttp3.Call findPetsByStatusAsync(List status, final ApiCallback> _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = findPetsByStatusValidateBeforeCall(status, progressListener, progressRequestListener); + okhttp3.Call localVarCall = findPetsByStatusValidateBeforeCall(status, _progressListener, _progressRequestListener); Type localVarReturnType = new TypeToken>(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; } /** * Build call for findPetsByTags * @param tags Tags to filter by (required) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener + * @param _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object * @deprecated */ @Deprecated - public okhttp3.Call findPetsByTagsCall(List tags, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public okhttp3.Call findPetsByTagsCall(List tags, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = new Object(); // create path and map variables @@ -443,7 +443,7 @@ public class PetApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); if (tags != null) { - localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("csv", "tags", tags)); + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "tags", tags)); } Map localVarHeaderParams = new HashMap(); @@ -451,7 +451,7 @@ public class PetApi { final String[] localVarAccepts = { "application/xml", "application/json" }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -459,28 +459,28 @@ public class PetApi { final String[] localVarContentTypes = { }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { "petstore_auth" }; - return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @Deprecated @SuppressWarnings("rawtypes") - private okhttp3.Call findPetsByTagsValidateBeforeCall(List tags, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private okhttp3.Call findPetsByTagsValidateBeforeCall(List tags, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'tags' is set if (tags == null) { @@ -488,8 +488,8 @@ public class PetApi { } - okhttp3.Call call = findPetsByTagsCall(tags, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = findPetsByTagsCall(tags, _progressListener, _progressRequestListener); + return localVarCall; } @@ -503,8 +503,8 @@ public class PetApi { */ @Deprecated public List findPetsByTags(List tags) throws ApiException { - ApiResponse> resp = findPetsByTagsWithHttpInfo(tags); - return resp.getData(); + ApiResponse> localVarResp = findPetsByTagsWithHttpInfo(tags); + return localVarResp.getData(); } /** @@ -517,61 +517,61 @@ public class PetApi { */ @Deprecated public ApiResponse> findPetsByTagsWithHttpInfo(List tags) throws ApiException { - okhttp3.Call call = findPetsByTagsValidateBeforeCall(tags, null, null); + okhttp3.Call localVarCall = findPetsByTagsValidateBeforeCall(tags, null, null); Type localVarReturnType = new TypeToken>(){}.getType(); - return apiClient.execute(call, localVarReturnType); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Finds Pets by tags (asynchronously) * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * @param tags Tags to filter by (required) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @deprecated */ @Deprecated - public okhttp3.Call findPetsByTagsAsync(List tags, final ApiCallback> callback) throws ApiException { + public okhttp3.Call findPetsByTagsAsync(List tags, final ApiCallback> _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = findPetsByTagsValidateBeforeCall(tags, progressListener, progressRequestListener); + okhttp3.Call localVarCall = findPetsByTagsValidateBeforeCall(tags, _progressListener, _progressRequestListener); Type localVarReturnType = new TypeToken>(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; } /** * Build call for getPetById * @param petId ID of pet to return (required) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener + * @param _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/pet/{petId}" - .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); + .replaceAll("\\{" + "petId" + "\\}", localVarApiClient.escapeString(petId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -580,7 +580,7 @@ public class PetApi { final String[] localVarAccepts = { "application/xml", "application/json" }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -588,27 +588,27 @@ public class PetApi { final String[] localVarContentTypes = { }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { "api_key" }; - return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'petId' is set if (petId == null) { @@ -616,8 +616,8 @@ public class PetApi { } - okhttp3.Call call = getPetByIdCall(petId, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = getPetByIdCall(petId, _progressListener, _progressRequestListener); + return localVarCall; } @@ -629,8 +629,8 @@ public class PetApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Pet getPetById(Long petId) throws ApiException { - ApiResponse resp = getPetByIdWithHttpInfo(petId); - return resp.getData(); + ApiResponse localVarResp = getPetByIdWithHttpInfo(petId); + return localVarResp.getData(); } /** @@ -641,54 +641,54 @@ public class PetApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse getPetByIdWithHttpInfo(Long petId) throws ApiException { - okhttp3.Call call = getPetByIdValidateBeforeCall(petId, null, null); + okhttp3.Call localVarCall = getPetByIdValidateBeforeCall(petId, null, null); Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Find pet by ID (asynchronously) * Returns a single pet * @param petId ID of pet to return (required) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call getPetByIdAsync(Long petId, final ApiCallback callback) throws ApiException { + public okhttp3.Call getPetByIdAsync(Long petId, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = getPetByIdValidateBeforeCall(petId, progressListener, progressRequestListener); + okhttp3.Call localVarCall = getPetByIdValidateBeforeCall(petId, _progressListener, _progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; } /** * 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 _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = body; // create path and map variables @@ -701,7 +701,7 @@ public class PetApi { final String[] localVarAccepts = { }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -709,27 +709,27 @@ public class PetApi { final String[] localVarContentTypes = { "application/json", "application/xml" }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { "petstore_auth" }; - return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'body' is set if (body == null) { @@ -737,8 +737,8 @@ public class PetApi { } - okhttp3.Call call = updatePetCall(body, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = updatePetCall(body, _progressListener, _progressRequestListener); + return localVarCall; } @@ -760,59 +760,59 @@ public class PetApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse updatePetWithHttpInfo(Pet body) throws ApiException { - okhttp3.Call call = updatePetValidateBeforeCall(body, null, null); - return apiClient.execute(call); + okhttp3.Call localVarCall = updatePetValidateBeforeCall(body, null, null); + return localVarApiClient.execute(localVarCall); } /** * Update an existing pet (asynchronously) * * @param body Pet object that needs to be added to the store (required) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call updatePetAsync(Pet body, final ApiCallback callback) throws ApiException { + public okhttp3.Call updatePetAsync(Pet body, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = updatePetValidateBeforeCall(body, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; + okhttp3.Call localVarCall = updatePetValidateBeforeCall(body, _progressListener, _progressRequestListener); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; } /** * Build call for updatePetWithForm * @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 _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/pet/{petId}" - .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); + .replaceAll("\\{" + "petId" + "\\}", localVarApiClient.escapeString(petId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -829,7 +829,7 @@ public class PetApi { final String[] localVarAccepts = { }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -837,27 +837,27 @@ public class PetApi { final String[] localVarContentTypes = { "application/x-www-form-urlencoded" }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { "petstore_auth" }; - return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'petId' is set if (petId == null) { @@ -865,8 +865,8 @@ public class PetApi { } - okhttp3.Call call = updatePetWithFormCall(petId, name, status, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = updatePetWithFormCall(petId, name, status, _progressListener, _progressRequestListener); + return localVarCall; } @@ -892,8 +892,8 @@ public class PetApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse updatePetWithFormWithHttpInfo(Long petId, String name, String status) throws ApiException { - okhttp3.Call call = updatePetWithFormValidateBeforeCall(petId, name, status, null, null); - return apiClient.execute(call); + okhttp3.Call localVarCall = updatePetWithFormValidateBeforeCall(petId, name, status, null, null); + return localVarApiClient.execute(localVarCall); } /** @@ -902,51 +902,51 @@ 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 callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call updatePetWithFormAsync(Long petId, String name, String status, final ApiCallback callback) throws ApiException { + public okhttp3.Call updatePetWithFormAsync(Long petId, String name, String status, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = updatePetWithFormValidateBeforeCall(petId, name, status, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; + okhttp3.Call localVarCall = updatePetWithFormValidateBeforeCall(petId, name, status, _progressListener, _progressRequestListener); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; } /** * Build call for uploadFile * @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 _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/pet/{petId}/uploadImage" - .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); + .replaceAll("\\{" + "petId" + "\\}", localVarApiClient.escapeString(petId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -963,7 +963,7 @@ public class PetApi { final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -971,27 +971,27 @@ public class PetApi { final String[] localVarContentTypes = { "multipart/form-data" }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { "petstore_auth" }; - return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'petId' is set if (petId == null) { @@ -999,8 +999,8 @@ public class PetApi { } - okhttp3.Call call = uploadFileCall(petId, additionalMetadata, file, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = uploadFileCall(petId, additionalMetadata, file, _progressListener, _progressRequestListener); + return localVarCall; } @@ -1014,8 +1014,8 @@ public class PetApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File file) throws ApiException { - ApiResponse resp = uploadFileWithHttpInfo(petId, additionalMetadata, file); - return resp.getData(); + ApiResponse localVarResp = uploadFileWithHttpInfo(petId, additionalMetadata, file); + return localVarResp.getData(); } /** @@ -1028,9 +1028,9 @@ public class PetApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse uploadFileWithHttpInfo(Long petId, String additionalMetadata, File file) throws ApiException { - okhttp3.Call call = uploadFileValidateBeforeCall(petId, additionalMetadata, file, null, null); + okhttp3.Call localVarCall = uploadFileValidateBeforeCall(petId, additionalMetadata, file, null, null); Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** @@ -1039,52 +1039,52 @@ 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 callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call uploadFileAsync(Long petId, String additionalMetadata, File file, final ApiCallback callback) throws ApiException { + public okhttp3.Call uploadFileAsync(Long petId, String additionalMetadata, File file, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = uploadFileValidateBeforeCall(petId, additionalMetadata, file, progressListener, progressRequestListener); + okhttp3.Call localVarCall = uploadFileValidateBeforeCall(petId, additionalMetadata, file, _progressListener, _progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; } /** * Build call for uploadFileWithRequiredFile * @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 _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/fake/{petId}/uploadImageWithRequiredFile" - .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); + .replaceAll("\\{" + "petId" + "\\}", localVarApiClient.escapeString(petId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1101,7 +1101,7 @@ public class PetApi { final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -1109,27 +1109,27 @@ public class PetApi { final String[] localVarContentTypes = { "multipart/form-data" }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { "petstore_auth" }; - return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'petId' is set if (petId == null) { @@ -1142,8 +1142,8 @@ public class PetApi { } - okhttp3.Call call = uploadFileWithRequiredFileCall(petId, requiredFile, additionalMetadata, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = uploadFileWithRequiredFileCall(petId, requiredFile, additionalMetadata, _progressListener, _progressRequestListener); + return localVarCall; } @@ -1157,8 +1157,8 @@ public class PetApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ModelApiResponse uploadFileWithRequiredFile(Long petId, File requiredFile, String additionalMetadata) throws ApiException { - ApiResponse resp = uploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata); - return resp.getData(); + ApiResponse localVarResp = uploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata); + return localVarResp.getData(); } /** @@ -1171,9 +1171,9 @@ public class PetApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse uploadFileWithRequiredFileWithHttpInfo(Long petId, File requiredFile, String additionalMetadata) throws ApiException { - okhttp3.Call call = uploadFileWithRequiredFileValidateBeforeCall(petId, requiredFile, additionalMetadata, null, null); + okhttp3.Call localVarCall = uploadFileWithRequiredFileValidateBeforeCall(petId, requiredFile, additionalMetadata, null, null); Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** @@ -1182,34 +1182,34 @@ 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 callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call uploadFileWithRequiredFileAsync(Long petId, File requiredFile, String additionalMetadata, final ApiCallback callback) throws ApiException { + public okhttp3.Call uploadFileWithRequiredFileAsync(Long petId, File requiredFile, String additionalMetadata, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = uploadFileWithRequiredFileValidateBeforeCall(petId, requiredFile, additionalMetadata, progressListener, progressRequestListener); + okhttp3.Call localVarCall = uploadFileWithRequiredFileValidateBeforeCall(petId, requiredFile, additionalMetadata, _progressListener, _progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; } } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/StoreApi.java index 0fa806a491f..c43fecbf92a 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/StoreApi.java @@ -36,38 +36,38 @@ import java.util.List; import java.util.Map; public class StoreApi { - private ApiClient apiClient; + private ApiClient localVarApiClient; public StoreApi() { this(Configuration.getDefaultApiClient()); } public StoreApi(ApiClient apiClient) { - this.apiClient = apiClient; + this.localVarApiClient = apiClient; } public ApiClient getApiClient() { - return apiClient; + return localVarApiClient; } public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; + this.localVarApiClient = apiClient; } /** * 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 _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/store/order/{order_id}" - .replaceAll("\\{" + "order_id" + "\\}", apiClient.escapeString(orderId.toString())); + .replaceAll("\\{" + "order_id" + "\\}", localVarApiClient.escapeString(orderId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -76,7 +76,7 @@ public class StoreApi { final String[] localVarAccepts = { }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -84,27 +84,27 @@ public class StoreApi { final String[] localVarContentTypes = { }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'orderId' is set if (orderId == null) { @@ -112,8 +112,8 @@ public class StoreApi { } - okhttp3.Call call = deleteOrderCall(orderId, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = deleteOrderCall(orderId, _progressListener, _progressRequestListener); + return localVarCall; } @@ -135,51 +135,51 @@ public class StoreApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse deleteOrderWithHttpInfo(String orderId) throws ApiException { - okhttp3.Call call = deleteOrderValidateBeforeCall(orderId, null, null); - return apiClient.execute(call); + okhttp3.Call localVarCall = deleteOrderValidateBeforeCall(orderId, null, null); + return localVarApiClient.execute(localVarCall); } /** * Delete purchase order by ID (asynchronously) * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors * @param orderId ID of the order that needs to be deleted (required) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call deleteOrderAsync(String orderId, final ApiCallback callback) throws ApiException { + public okhttp3.Call deleteOrderAsync(String orderId, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = deleteOrderValidateBeforeCall(orderId, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; + okhttp3.Call localVarCall = deleteOrderValidateBeforeCall(orderId, _progressListener, _progressRequestListener); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; } /** * Build call for getInventory - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener + * @param _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = new Object(); // create path and map variables @@ -192,7 +192,7 @@ public class StoreApi { final String[] localVarAccepts = { "application/json" }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -200,31 +200,31 @@ public class StoreApi { final String[] localVarContentTypes = { }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { "api_key" }; - return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @SuppressWarnings("rawtypes") - private okhttp3.Call getInventoryValidateBeforeCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private okhttp3.Call getInventoryValidateBeforeCall(final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { - okhttp3.Call call = getInventoryCall(progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = getInventoryCall(_progressListener, _progressRequestListener); + return localVarCall; } @@ -235,8 +235,8 @@ public class StoreApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Map getInventory() throws ApiException { - ApiResponse> resp = getInventoryWithHttpInfo(); - return resp.getData(); + ApiResponse> localVarResp = getInventoryWithHttpInfo(); + return localVarResp.getData(); } /** @@ -246,58 +246,58 @@ public class StoreApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse> getInventoryWithHttpInfo() throws ApiException { - okhttp3.Call call = getInventoryValidateBeforeCall(null, null); + okhttp3.Call localVarCall = getInventoryValidateBeforeCall(null, null); Type localVarReturnType = new TypeToken>(){}.getType(); - return apiClient.execute(call, localVarReturnType); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Returns pet inventories by status (asynchronously) * Returns a map of status codes to quantities - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call getInventoryAsync(final ApiCallback> callback) throws ApiException { + public okhttp3.Call getInventoryAsync(final ApiCallback> _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = getInventoryValidateBeforeCall(progressListener, progressRequestListener); + okhttp3.Call localVarCall = getInventoryValidateBeforeCall(_progressListener, _progressRequestListener); Type localVarReturnType = new TypeToken>(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; } /** * 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 _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/store/order/{order_id}" - .replaceAll("\\{" + "order_id" + "\\}", apiClient.escapeString(orderId.toString())); + .replaceAll("\\{" + "order_id" + "\\}", localVarApiClient.escapeString(orderId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -306,7 +306,7 @@ public class StoreApi { final String[] localVarAccepts = { "application/xml", "application/json" }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -314,27 +314,27 @@ public class StoreApi { final String[] localVarContentTypes = { }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'orderId' is set if (orderId == null) { @@ -342,8 +342,8 @@ public class StoreApi { } - okhttp3.Call call = getOrderByIdCall(orderId, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = getOrderByIdCall(orderId, _progressListener, _progressRequestListener); + return localVarCall; } @@ -355,8 +355,8 @@ public class StoreApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Order getOrderById(Long orderId) throws ApiException { - ApiResponse resp = getOrderByIdWithHttpInfo(orderId); - return resp.getData(); + ApiResponse localVarResp = getOrderByIdWithHttpInfo(orderId); + return localVarResp.getData(); } /** @@ -367,54 +367,54 @@ public class StoreApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse getOrderByIdWithHttpInfo(Long orderId) throws ApiException { - okhttp3.Call call = getOrderByIdValidateBeforeCall(orderId, null, null); + okhttp3.Call localVarCall = getOrderByIdValidateBeforeCall(orderId, null, null); Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Find purchase order by ID (asynchronously) * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions * @param orderId ID of pet that needs to be fetched (required) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call getOrderByIdAsync(Long orderId, final ApiCallback callback) throws ApiException { + public okhttp3.Call getOrderByIdAsync(Long orderId, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = getOrderByIdValidateBeforeCall(orderId, progressListener, progressRequestListener); + okhttp3.Call localVarCall = getOrderByIdValidateBeforeCall(orderId, _progressListener, _progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; } /** * Build call for placeOrder * @param body order placed for purchasing the pet (required) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener + * @param _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = body; // create path and map variables @@ -427,7 +427,7 @@ public class StoreApi { final String[] localVarAccepts = { "application/xml", "application/json" }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -435,27 +435,27 @@ public class StoreApi { final String[] localVarContentTypes = { }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'body' is set if (body == null) { @@ -463,8 +463,8 @@ public class StoreApi { } - okhttp3.Call call = placeOrderCall(body, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = placeOrderCall(body, _progressListener, _progressRequestListener); + return localVarCall; } @@ -476,8 +476,8 @@ public class StoreApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public Order placeOrder(Order body) throws ApiException { - ApiResponse resp = placeOrderWithHttpInfo(body); - return resp.getData(); + ApiResponse localVarResp = placeOrderWithHttpInfo(body); + return localVarResp.getData(); } /** @@ -488,43 +488,43 @@ public class StoreApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse placeOrderWithHttpInfo(Order body) throws ApiException { - okhttp3.Call call = placeOrderValidateBeforeCall(body, null, null); + okhttp3.Call localVarCall = placeOrderValidateBeforeCall(body, null, null); Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Place an order for a pet (asynchronously) * * @param body order placed for purchasing the pet (required) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call placeOrderAsync(Order body, final ApiCallback callback) throws ApiException { + public okhttp3.Call placeOrderAsync(Order body, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = placeOrderValidateBeforeCall(body, progressListener, progressRequestListener); + okhttp3.Call localVarCall = placeOrderValidateBeforeCall(body, _progressListener, _progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; } } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/UserApi.java index b7d298439a1..991cc2df4b7 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/UserApi.java @@ -36,33 +36,33 @@ import java.util.List; import java.util.Map; public class UserApi { - private ApiClient apiClient; + private ApiClient localVarApiClient; public UserApi() { this(Configuration.getDefaultApiClient()); } public UserApi(ApiClient apiClient) { - this.apiClient = apiClient; + this.localVarApiClient = apiClient; } public ApiClient getApiClient() { - return apiClient; + return localVarApiClient; } public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; + this.localVarApiClient = apiClient; } /** * Build call for createUser * @param body Created user object (required) - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener + * @param _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = body; // create path and map variables @@ -75,7 +75,7 @@ public class UserApi { final String[] localVarAccepts = { }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -83,27 +83,27 @@ public class UserApi { final String[] localVarContentTypes = { }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'body' is set if (body == null) { @@ -111,8 +111,8 @@ public class UserApi { } - okhttp3.Call call = createUserCall(body, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = createUserCall(body, _progressListener, _progressRequestListener); + return localVarCall; } @@ -134,52 +134,52 @@ public class UserApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse createUserWithHttpInfo(User body) throws ApiException { - okhttp3.Call call = createUserValidateBeforeCall(body, null, null); - return apiClient.execute(call); + okhttp3.Call localVarCall = createUserValidateBeforeCall(body, null, null); + return localVarApiClient.execute(localVarCall); } /** * Create user (asynchronously) * This can only be done by the logged in user. * @param body Created user object (required) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call createUserAsync(User body, final ApiCallback callback) throws ApiException { + public okhttp3.Call createUserAsync(User body, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = createUserValidateBeforeCall(body, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; + okhttp3.Call localVarCall = createUserValidateBeforeCall(body, _progressListener, _progressRequestListener); + 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 _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public okhttp3.Call createUsersWithArrayInputCall(List body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public okhttp3.Call createUsersWithArrayInputCall(List body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = body; // create path and map variables @@ -192,7 +192,7 @@ public class UserApi { final String[] localVarAccepts = { }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -200,27 +200,27 @@ public class UserApi { final String[] localVarContentTypes = { }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @SuppressWarnings("rawtypes") - private okhttp3.Call createUsersWithArrayInputValidateBeforeCall(List body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private okhttp3.Call createUsersWithArrayInputValidateBeforeCall(List body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'body' is set if (body == null) { @@ -228,8 +228,8 @@ public class UserApi { } - okhttp3.Call call = createUsersWithArrayInputCall(body, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = createUsersWithArrayInputCall(body, _progressListener, _progressRequestListener); + return localVarCall; } @@ -251,52 +251,52 @@ public class UserApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse createUsersWithArrayInputWithHttpInfo(List body) throws ApiException { - okhttp3.Call call = createUsersWithArrayInputValidateBeforeCall(body, null, null); - return apiClient.execute(call); + okhttp3.Call localVarCall = createUsersWithArrayInputValidateBeforeCall(body, null, null); + return localVarApiClient.execute(localVarCall); } /** * Creates list of users with given input array (asynchronously) * * @param body List of user object (required) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call createUsersWithArrayInputAsync(List body, final ApiCallback callback) throws ApiException { + public okhttp3.Call createUsersWithArrayInputAsync(List body, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = createUsersWithArrayInputValidateBeforeCall(body, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; + okhttp3.Call localVarCall = createUsersWithArrayInputValidateBeforeCall(body, _progressListener, _progressRequestListener); + 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 _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public okhttp3.Call createUsersWithListInputCall(List body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public okhttp3.Call createUsersWithListInputCall(List body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = body; // create path and map variables @@ -309,7 +309,7 @@ public class UserApi { final String[] localVarAccepts = { }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -317,27 +317,27 @@ public class UserApi { final String[] localVarContentTypes = { }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @SuppressWarnings("rawtypes") - private okhttp3.Call createUsersWithListInputValidateBeforeCall(List body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private okhttp3.Call createUsersWithListInputValidateBeforeCall(List body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'body' is set if (body == null) { @@ -345,8 +345,8 @@ public class UserApi { } - okhttp3.Call call = createUsersWithListInputCall(body, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = createUsersWithListInputCall(body, _progressListener, _progressRequestListener); + return localVarCall; } @@ -368,57 +368,57 @@ public class UserApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse createUsersWithListInputWithHttpInfo(List body) throws ApiException { - okhttp3.Call call = createUsersWithListInputValidateBeforeCall(body, null, null); - return apiClient.execute(call); + okhttp3.Call localVarCall = createUsersWithListInputValidateBeforeCall(body, null, null); + return localVarApiClient.execute(localVarCall); } /** * Creates list of users with given input array (asynchronously) * * @param body List of user object (required) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call createUsersWithListInputAsync(List body, final ApiCallback callback) throws ApiException { + public okhttp3.Call createUsersWithListInputAsync(List body, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = createUsersWithListInputValidateBeforeCall(body, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; + okhttp3.Call localVarCall = createUsersWithListInputValidateBeforeCall(body, _progressListener, _progressRequestListener); + 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 _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/user/{username}" - .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); + .replaceAll("\\{" + "username" + "\\}", localVarApiClient.escapeString(username.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -427,7 +427,7 @@ public class UserApi { final String[] localVarAccepts = { }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -435,27 +435,27 @@ public class UserApi { final String[] localVarContentTypes = { }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'username' is set if (username == null) { @@ -463,8 +463,8 @@ public class UserApi { } - okhttp3.Call call = deleteUserCall(username, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = deleteUserCall(username, _progressListener, _progressRequestListener); + return localVarCall; } @@ -486,57 +486,57 @@ public class UserApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse deleteUserWithHttpInfo(String username) throws ApiException { - okhttp3.Call call = deleteUserValidateBeforeCall(username, null, null); - return apiClient.execute(call); + okhttp3.Call localVarCall = deleteUserValidateBeforeCall(username, null, null); + return localVarApiClient.execute(localVarCall); } /** * Delete user (asynchronously) * This can only be done by the logged in user. * @param username The name that needs to be deleted (required) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call deleteUserAsync(String username, final ApiCallback callback) throws ApiException { + public okhttp3.Call deleteUserAsync(String username, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = deleteUserValidateBeforeCall(username, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; + okhttp3.Call localVarCall = deleteUserValidateBeforeCall(username, _progressListener, _progressRequestListener); + 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 _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/user/{username}" - .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); + .replaceAll("\\{" + "username" + "\\}", localVarApiClient.escapeString(username.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -545,7 +545,7 @@ public class UserApi { final String[] localVarAccepts = { "application/xml", "application/json" }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -553,27 +553,27 @@ public class UserApi { final String[] localVarContentTypes = { }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'username' is set if (username == null) { @@ -581,8 +581,8 @@ public class UserApi { } - okhttp3.Call call = getUserByNameCall(username, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = getUserByNameCall(username, _progressListener, _progressRequestListener); + return localVarCall; } @@ -594,8 +594,8 @@ public class UserApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public User getUserByName(String username) throws ApiException { - ApiResponse resp = getUserByNameWithHttpInfo(username); - return resp.getData(); + ApiResponse localVarResp = getUserByNameWithHttpInfo(username); + return localVarResp.getData(); } /** @@ -606,55 +606,55 @@ public class UserApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse getUserByNameWithHttpInfo(String username) throws ApiException { - okhttp3.Call call = getUserByNameValidateBeforeCall(username, null, null); + okhttp3.Call localVarCall = getUserByNameValidateBeforeCall(username, null, null); Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get user by user name (asynchronously) * * @param username The name that needs to be fetched. Use user1 for testing. (required) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call getUserByNameAsync(String username, final ApiCallback callback) throws ApiException { + public okhttp3.Call getUserByNameAsync(String username, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = getUserByNameValidateBeforeCall(username, progressListener, progressRequestListener); + okhttp3.Call localVarCall = getUserByNameValidateBeforeCall(username, _progressListener, _progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; } /** * 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 _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = new Object(); // create path and map variables @@ -663,11 +663,11 @@ public class UserApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); if (username != null) { - localVarQueryParams.addAll(apiClient.parameterToPair("username", username)); + localVarQueryParams.addAll(localVarApiClient.parameterToPair("username", username)); } if (password != null) { - localVarQueryParams.addAll(apiClient.parameterToPair("password", password)); + localVarQueryParams.addAll(localVarApiClient.parameterToPair("password", password)); } Map localVarHeaderParams = new HashMap(); @@ -675,7 +675,7 @@ public class UserApi { final String[] localVarAccepts = { "application/xml", "application/json" }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -683,27 +683,27 @@ public class UserApi { final String[] localVarContentTypes = { }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'username' is set if (username == null) { @@ -716,8 +716,8 @@ public class UserApi { } - okhttp3.Call call = loginUserCall(username, password, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = loginUserCall(username, password, _progressListener, _progressRequestListener); + return localVarCall; } @@ -730,8 +730,8 @@ public class UserApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public String loginUser(String username, String password) throws ApiException { - ApiResponse resp = loginUserWithHttpInfo(username, password); - return resp.getData(); + ApiResponse localVarResp = loginUserWithHttpInfo(username, password); + return localVarResp.getData(); } /** @@ -743,9 +743,9 @@ public class UserApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse loginUserWithHttpInfo(String username, String password) throws ApiException { - okhttp3.Call call = loginUserValidateBeforeCall(username, password, null, null); + okhttp3.Call localVarCall = loginUserValidateBeforeCall(username, password, null, null); Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** @@ -753,44 +753,44 @@ public class UserApi { * * @param username The user name for login (required) * @param password The password for login in clear text (required) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call loginUserAsync(String username, String password, final ApiCallback callback) throws ApiException { + public okhttp3.Call loginUserAsync(String username, String password, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = loginUserValidateBeforeCall(username, password, progressListener, progressRequestListener); + okhttp3.Call localVarCall = loginUserValidateBeforeCall(username, password, _progressListener, _progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; } /** * Build call for logoutUser - * @param progressListener Progress listener - * @param progressRequestListener Progress request listener + * @param _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = new Object(); // create path and map variables @@ -803,7 +803,7 @@ public class UserApi { final String[] localVarAccepts = { }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -811,31 +811,31 @@ public class UserApi { final String[] localVarContentTypes = { }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @SuppressWarnings("rawtypes") - private okhttp3.Call logoutUserValidateBeforeCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private okhttp3.Call logoutUserValidateBeforeCall(final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { - okhttp3.Call call = logoutUserCall(progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = logoutUserCall(_progressListener, _progressRequestListener); + return localVarCall; } @@ -855,57 +855,57 @@ public class UserApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse logoutUserWithHttpInfo() throws ApiException { - okhttp3.Call call = logoutUserValidateBeforeCall(null, null); - return apiClient.execute(call); + okhttp3.Call localVarCall = logoutUserValidateBeforeCall(null, null); + return localVarApiClient.execute(localVarCall); } /** * Logs out current logged in user session (asynchronously) * - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call logoutUserAsync(final ApiCallback callback) throws ApiException { + public okhttp3.Call logoutUserAsync(final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = logoutUserValidateBeforeCall(progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; + okhttp3.Call localVarCall = logoutUserValidateBeforeCall(_progressListener, _progressRequestListener); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; } /** * 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 _progressListener Progress listener + * @param _progressRequestListener Progress request listener * @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { Object localVarPostBody = body; // create path and map variables String localVarPath = "/user/{username}" - .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); + .replaceAll("\\{" + "username" + "\\}", localVarApiClient.escapeString(username.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -914,7 +914,7 @@ public class UserApi { final String[] localVarAccepts = { }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } @@ -922,27 +922,27 @@ public class UserApi { final String[] localVarContentTypes = { }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); - if (progressListener != null) { - apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { + 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)) + .body(new ProgressResponseBody(originalResponse.body(), _progressListener)) .build(); } }).build()); } String[] localVarAuthNames = new String[] { }; - return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener); } @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 ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException { // verify the required parameter 'username' is set if (username == null) { @@ -955,8 +955,8 @@ public class UserApi { } - okhttp3.Call call = updateUserCall(username, body, progressListener, progressRequestListener); - return call; + okhttp3.Call localVarCall = updateUserCall(username, body, _progressListener, _progressRequestListener); + return localVarCall; } @@ -980,8 +980,8 @@ public class UserApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse updateUserWithHttpInfo(String username, User body) throws ApiException { - okhttp3.Call call = updateUserValidateBeforeCall(username, body, null, null); - return apiClient.execute(call); + okhttp3.Call localVarCall = updateUserValidateBeforeCall(username, body, null, null); + return localVarApiClient.execute(localVarCall); } /** @@ -989,33 +989,33 @@ public class UserApi { * This can only be done by the logged in user. * @param username name that need to be deleted (required) * @param body Updated user object (required) - * @param callback The callback to be executed when the API call finishes + * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public okhttp3.Call updateUserAsync(String username, User body, final ApiCallback callback) throws ApiException { + public okhttp3.Call updateUserAsync(String username, User body, final ApiCallback _callback) throws ApiException { - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + ProgressResponseBody.ProgressListener _progressListener = null; + ProgressRequestBody.ProgressRequestListener _progressRequestListener = null; - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { + if (_callback != null) { + _progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); + _callback.onDownloadProgress(bytesRead, contentLength, done); } }; - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + _progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); + _callback.onUploadProgress(bytesWritten, contentLength, done); } }; } - okhttp3.Call call = updateUserValidateBeforeCall(username, body, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); - return call; + okhttp3.Call localVarCall = updateUserValidateBeforeCall(username, body, _progressListener, _progressRequestListener); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; } }