Remove localVarPrefix from Java client (#2045)

* remove localVarPrefix from java client

* rename local varaible

* update samples
This commit is contained in:
William Cheng 2019-02-08 11:51:26 +08:00 committed by GitHub
parent 36fa7102dd
commit 0a2fb8db8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
30 changed files with 2118 additions and 2139 deletions

View File

@ -29,7 +29,6 @@ sidebar_label: groovy
|licenseName|The name of the license| |null| |licenseName|The name of the license| |null|
|licenseUrl|The URL of the license| |null| |licenseUrl|The URL of the license| |null|
|sourceFolder|source folder for generated code| |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| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |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| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|

View File

@ -29,7 +29,6 @@ sidebar_label: java-inflector
|licenseName|The name of the license| |null| |licenseName|The name of the license| |null|
|licenseUrl|The URL of the license| |null| |licenseUrl|The URL of the license| |null|
|sourceFolder|source folder for generated code| |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| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |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| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|

View File

@ -29,7 +29,6 @@ sidebar_label: java-msf4j
|licenseName|The name of the license| |null| |licenseName|The name of the license| |null|
|licenseUrl|The URL of the license| |null| |licenseUrl|The URL of the license| |null|
|sourceFolder|source folder for generated code| |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| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |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| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|

View File

@ -29,7 +29,6 @@ sidebar_label: java-pkmst
|licenseName|The name of the license| |null| |licenseName|The name of the license| |null|
|licenseUrl|The URL of the license| |null| |licenseUrl|The URL of the license| |null|
|sourceFolder|source folder for generated code| |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| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |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| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|

View File

@ -29,7 +29,6 @@ sidebar_label: java-play-framework
|licenseName|The name of the license| |null| |licenseName|The name of the license| |null|
|licenseUrl|The URL of the license| |null| |licenseUrl|The URL of the license| |null|
|sourceFolder|source folder for generated code| |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| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |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| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|

View File

@ -29,7 +29,6 @@ sidebar_label: java-undertow-server
|licenseName|The name of the license| |null| |licenseName|The name of the license| |null|
|licenseUrl|The URL of the license| |null| |licenseUrl|The URL of the license| |null|
|sourceFolder|source folder for generated code| |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| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |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| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|

View File

@ -29,7 +29,6 @@ sidebar_label: java-vertx
|licenseName|The name of the license| |null| |licenseName|The name of the license| |null|
|licenseUrl|The URL of the license| |null| |licenseUrl|The URL of the license| |null|
|sourceFolder|source folder for generated code| |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| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |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| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|

View File

@ -29,7 +29,6 @@ sidebar_label: java
|licenseName|The name of the license| |null| |licenseName|The name of the license| |null|
|licenseUrl|The URL of the license| |null| |licenseUrl|The URL of the license| |null|
|sourceFolder|source folder for generated code| |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| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |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| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|

View File

@ -29,7 +29,6 @@ sidebar_label: jaxrs-cxf-cdi
|licenseName|The name of the license| |null| |licenseName|The name of the license| |null|
|licenseUrl|The URL of the license| |null| |licenseUrl|The URL of the license| |null|
|sourceFolder|source folder for generated code| |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| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |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| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|

View File

@ -29,7 +29,6 @@ sidebar_label: jaxrs-cxf-client
|licenseName|The name of the license| |null| |licenseName|The name of the license| |null|
|licenseUrl|The URL of the license| |null| |licenseUrl|The URL of the license| |null|
|sourceFolder|source folder for generated code| |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| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |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| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|

View File

@ -29,7 +29,6 @@ sidebar_label: jaxrs-cxf
|licenseName|The name of the license| |null| |licenseName|The name of the license| |null|
|licenseUrl|The URL of the license| |null| |licenseUrl|The URL of the license| |null|
|sourceFolder|source folder for generated code| |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| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |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| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|

View File

@ -29,7 +29,6 @@ sidebar_label: jaxrs-jersey
|licenseName|The name of the license| |null| |licenseName|The name of the license| |null|
|licenseUrl|The URL of the license| |null| |licenseUrl|The URL of the license| |null|
|sourceFolder|source folder for generated code| |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| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |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| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|

View File

@ -29,7 +29,6 @@ sidebar_label: jaxrs-resteasy-eap
|licenseName|The name of the license| |null| |licenseName|The name of the license| |null|
|licenseUrl|The URL of the license| |null| |licenseUrl|The URL of the license| |null|
|sourceFolder|source folder for generated code| |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| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |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| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|

View File

@ -29,7 +29,6 @@ sidebar_label: jaxrs-resteasy
|licenseName|The name of the license| |null| |licenseName|The name of the license| |null|
|licenseUrl|The URL of the license| |null| |licenseUrl|The URL of the license| |null|
|sourceFolder|source folder for generated code| |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| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |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| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|

View File

@ -29,7 +29,6 @@ sidebar_label: jaxrs-spec
|licenseName|The name of the license| |null| |licenseName|The name of the license| |null|
|licenseUrl|The URL of the license| |null| |licenseUrl|The URL of the license| |null|
|sourceFolder|source folder for generated code| |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| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |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| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|

View File

@ -29,7 +29,6 @@ sidebar_label: spring
|licenseName|The name of the license| |null| |licenseName|The name of the license| |null|
|licenseUrl|The URL of the license| |null| |licenseUrl|The URL of the license| |null|
|sourceFolder|source folder for generated code| |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| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |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| |fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|

View File

@ -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_NAME, CodegenConstants.LICENSE_NAME_DESC));
cliOptions.add(new CliOption(CodegenConstants.LICENSE_URL, CodegenConstants.LICENSE_URL_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.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.SERIALIZABLE_MODEL, CodegenConstants.SERIALIZABLE_MODEL_DESC));
cliOptions.add(CliOption.newBoolean(CodegenConstants.SERIALIZE_BIG_DECIMAL_AS_STRING, CodegenConstants cliOptions.add(CliOption.newBoolean(CodegenConstants.SERIALIZE_BIG_DECIMAL_AS_STRING, CodegenConstants
.SERIALIZE_BIG_DECIMAL_AS_STRING_DESC)); .SERIALIZE_BIG_DECIMAL_AS_STRING_DESC));
@ -341,10 +340,6 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
} }
additionalProperties.put(CodegenConstants.SOURCE_FOLDER, sourceFolder); 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)) { if (additionalProperties.containsKey(CodegenConstants.SERIALIZABLE_MODEL)) {
this.setSerializableModel(Boolean.valueOf(additionalProperties.get(CodegenConstants.SERIALIZABLE_MODEL).toString())); this.setSerializableModel(Boolean.valueOf(additionalProperties.get(CodegenConstants.SERIALIZABLE_MODEL).toString()));
} }

View File

@ -44,30 +44,30 @@ import java.util.Map;
{{#operations}} {{#operations}}
public class {{classname}} { public class {{classname}} {
private ApiClient {{localVariablePrefix}}apiClient; private ApiClient localVarApiClient;
public {{classname}}() { public {{classname}}() {
this(Configuration.getDefaultApiClient()); this(Configuration.getDefaultApiClient());
} }
public {{classname}}(ApiClient apiClient) { public {{classname}}(ApiClient apiClient) {
this.{{localVariablePrefix}}apiClient = apiClient; this.localVarApiClient = apiClient;
} }
public ApiClient getApiClient() { public ApiClient getApiClient() {
return {{localVariablePrefix}}apiClient; return localVarApiClient;
} }
public void setApiClient(ApiClient apiClient) { public void setApiClient(ApiClient apiClient) {
this.{{localVariablePrefix}}apiClient = apiClient; this.localVarApiClient = apiClient;
} }
{{#operation}} {{#operation}}
{{^vendorExtensions.x-group-parameters}}/** {{^vendorExtensions.x-group-parameters}}/**
* Build call for {{operationId}}{{#allParams}} * Build call for {{operationId}}{{#allParams}}
* @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}){{/required}}{{/allParams}} * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}){{/required}}{{/allParams}}
* @param progressListener Progress listener * @param _progressListener Progress listener
* @param progressRequestListener Progress request listener * @param _progressRequestListener Progress request listener
* @return Call to execute * @return Call to execute
* @throws ApiException If fail to serialize the request body object * @throws ApiException If fail to serialize the request body object
{{#isDeprecated}} {{#isDeprecated}}
@ -81,70 +81,70 @@ public class {{classname}} {
{{#isDeprecated}} {{#isDeprecated}}
@Deprecated @Deprecated
{{/isDeprecated}} {{/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 { 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}}; Object localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}new Object(){{/bodyParam}};
// create path and map variables // create path and map variables
String {{localVariablePrefix}}localVarPath = "{{{path}}}"{{#pathParams}} String localVarPath = "{{{path}}}"{{#pathParams}}
.replaceAll("\\{" + "{{baseName}}" + "\\}", {{localVariablePrefix}}apiClient.escapeString({{{paramName}}}.toString())){{/pathParams}}; .replaceAll("\\{" + "{{baseName}}" + "\\}", localVarApiClient.escapeString({{{paramName}}}.toString())){{/pathParams}};
{{javaUtilPrefix}}List<Pair> {{localVariablePrefix}}localVarQueryParams = new {{javaUtilPrefix}}ArrayList<Pair>(); {{javaUtilPrefix}}List<Pair> localVarQueryParams = new {{javaUtilPrefix}}ArrayList<Pair>();
{{javaUtilPrefix}}List<Pair> {{localVariablePrefix}}localVarCollectionQueryParams = new {{javaUtilPrefix}}ArrayList<Pair>(); {{javaUtilPrefix}}List<Pair> localVarCollectionQueryParams = new {{javaUtilPrefix}}ArrayList<Pair>();
{{#queryParams}} {{#queryParams}}
if ({{paramName}} != null) { 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}} {{/queryParams}}
{{javaUtilPrefix}}Map<String, String> {{localVariablePrefix}}localVarHeaderParams = new {{javaUtilPrefix}}HashMap<String, String>(); {{javaUtilPrefix}}Map<String, String> localVarHeaderParams = new {{javaUtilPrefix}}HashMap<String, String>();
{{#headerParams}} {{#headerParams}}
if ({{paramName}} != null) { if ({{paramName}} != null) {
{{localVariablePrefix}}localVarHeaderParams.put("{{baseName}}", {{localVariablePrefix}}apiClient.parameterToString({{paramName}})); localVarHeaderParams.put("{{baseName}}", localVarApiClient.parameterToString({{paramName}}));
} }
{{/headerParams}} {{/headerParams}}
{{javaUtilPrefix}}Map<String, Object> {{localVariablePrefix}}localVarFormParams = new {{javaUtilPrefix}}HashMap<String, Object>(); {{javaUtilPrefix}}Map<String, Object> localVarFormParams = new {{javaUtilPrefix}}HashMap<String, Object>();
{{#formParams}} {{#formParams}}
if ({{paramName}} != null) { if ({{paramName}} != null) {
{{localVariablePrefix}}localVarFormParams.put("{{baseName}}", {{paramName}}); localVarFormParams.put("{{baseName}}", {{paramName}});
} }
{{/formParams}} {{/formParams}}
final String[] {{localVariablePrefix}}localVarAccepts = { final String[] localVarAccepts = {
{{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}}
}; };
final String {{localVariablePrefix}}localVarAccept = {{localVariablePrefix}}apiClient.selectHeaderAccept({{localVariablePrefix}}localVarAccepts); final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if ({{localVariablePrefix}}localVarAccept != null) { if (localVarAccept != null) {
{{localVariablePrefix}}localVarHeaderParams.put("Accept", {{localVariablePrefix}}localVarAccept); localVarHeaderParams.put("Accept", localVarAccept);
} }
final String[] {{localVariablePrefix}}localVarContentTypes = { final String[] localVarContentTypes = {
{{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}}
}; };
final String {{localVariablePrefix}}localVarContentType = {{localVariablePrefix}}apiClient.selectHeaderContentType({{localVariablePrefix}}localVarContentTypes); final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
{{localVariablePrefix}}localVarHeaderParams.put("Content-Type", {{localVariablePrefix}}localVarContentType); localVarHeaderParams.put("Content-Type", localVarContentType);
if (progressListener != null) { if (_progressListener != null) {
apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
@Override @Override
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException { public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
okhttp3.Response originalResponse = chain.proceed(chain.request()); okhttp3.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder() return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener)) .body(new ProgressResponseBody(originalResponse.body(), _progressListener))
.build(); .build();
} }
}).build()); }).build());
} }
String[] {{localVariablePrefix}}localVarAuthNames = new String[] { {{#authMethods}}"{{name}}"{{#hasMore}}, {{/hasMore}}{{/authMethods}} }; String[] 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); return localVarApiClient.buildCall(localVarPath, "{{httpMethod}}", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
} }
{{#isDeprecated}} {{#isDeprecated}}
@Deprecated @Deprecated
{{/isDeprecated}} {{/isDeprecated}}
@SuppressWarnings("rawtypes") @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}} {{^performBeanValidation}}
{{#allParams}}{{#required}} {{#allParams}}{{#required}}
// verify the required parameter '{{paramName}}' is set // verify the required parameter '{{paramName}}' is set
@ -153,8 +153,8 @@ public class {{classname}} {
} }
{{/required}}{{/allParams}} {{/required}}{{/allParams}}
okhttp3.Call {{localVariablePrefix}}call = {{operationId}}Call({{#allParams}}{{paramName}}, {{/allParams}}progressListener, progressRequestListener); okhttp3.Call localVarCall = {{operationId}}Call({{#allParams}}{{paramName}}, {{/allParams}}_progressListener, _progressRequestListener);
return {{localVariablePrefix}}call; return localVarCall;
{{/performBeanValidation}} {{/performBeanValidation}}
{{#performBeanValidation}} {{#performBeanValidation}}
@ -168,8 +168,8 @@ public class {{classname}} {
parameterValues); parameterValues);
if (violations.size() == 0) { if (violations.size() == 0) {
okhttp3.Call {{localVariablePrefix}}call = {{operationId}}Call({{#allParams}}{{paramName}}, {{/allParams}}progressListener, progressRequestListener); okhttp3.Call localVarCall = {{operationId}}Call({{#allParams}}{{paramName}}, {{/allParams}}_progressListener, _progressRequestListener);
return {{localVariablePrefix}}call; return localVarCall;
} else { } else {
throw new BeanValidationException((Set) violations); throw new BeanValidationException((Set) violations);
@ -204,8 +204,8 @@ public class {{classname}} {
@Deprecated @Deprecated
{{/isDeprecated}} {{/isDeprecated}}
public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException { 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}} {{#returnType}}ApiResponse<{{{returnType}}}> localVarResp = {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}}
return {{localVariablePrefix}}resp.getData();{{/returnType}} return localVarResp.getData();{{/returnType}}
} }
{{/vendorExtensions.x-group-parameters}} {{/vendorExtensions.x-group-parameters}}
@ -227,16 +227,16 @@ public class {{classname}} {
@Deprecated @Deprecated
{{/isDeprecated}} {{/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 { 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); okhttp3.Call localVarCall = {{operationId}}ValidateBeforeCall({{#allParams}}{{paramName}}, {{/allParams}}null, null);
{{#returnType}}Type {{localVariablePrefix}}localVarReturnType = new TypeToken<{{{returnType}}}>(){}.getType(); {{#returnType}}Type localVarReturnType = new TypeToken<{{{returnType}}}>(){}.getType();
return {{localVariablePrefix}}apiClient.execute({{localVariablePrefix}}call, {{localVariablePrefix}}localVarReturnType);{{/returnType}}{{^returnType}}return {{localVariablePrefix}}apiClient.execute({{localVariablePrefix}}call);{{/returnType}} return localVarApiClient.execute(localVarCall, localVarReturnType);{{/returnType}}{{^returnType}}return localVarApiClient.execute(localVarCall);{{/returnType}}
} }
{{^vendorExtensions.x-group-parameters}}/** {{^vendorExtensions.x-group-parameters}}/**
* {{summary}} (asynchronously) * {{summary}} (asynchronously)
* {{notes}}{{#allParams}} * {{notes}}{{#allParams}}
* @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}){{/required}}{{/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 * @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object * @throws ApiException If fail to process the API call, e.g. serializing the request body object
{{#isDeprecated}} {{#isDeprecated}}
@ -250,45 +250,45 @@ public class {{classname}} {
{{#isDeprecated}} {{#isDeprecated}}
@Deprecated @Deprecated
{{/isDeprecated}} {{/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; ProgressResponseBody.ProgressListener _progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null; ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
if (callback != null) { if (_callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() { _progressListener = new ProgressResponseBody.ProgressListener() {
@Override @Override
public void update(long bytesRead, long contentLength, boolean done) { 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 @Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { 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); okhttp3.Call localVarCall = {{operationId}}ValidateBeforeCall({{#allParams}}{{paramName}}, {{/allParams}}_progressListener, _progressRequestListener);
{{#returnType}}Type {{localVariablePrefix}}localVarReturnType = new TypeToken<{{{returnType}}}>(){}.getType(); {{#returnType}}Type localVarReturnType = new TypeToken<{{{returnType}}}>(){}.getType();
{{localVariablePrefix}}apiClient.executeAsync({{localVariablePrefix}}call, {{localVariablePrefix}}localVarReturnType, {{localVariablePrefix}}callback);{{/returnType}}{{^returnType}}{{localVariablePrefix}}apiClient.executeAsync({{localVariablePrefix}}call, {{localVariablePrefix}}callback);{{/returnType}} localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);{{/returnType}}{{^returnType}}localVarApiClient.executeAsync(localVarCall, _callback);{{/returnType}}
return {{localVariablePrefix}}call; return localVarCall;
} }
{{#vendorExtensions.x-group-parameters}} {{#vendorExtensions.x-group-parameters}}
public class API{{operationId}}Request { public class API{{operationId}}Request {
{{#requiredParams}} {{#requiredParams}}
private final {{{dataType}}} {{localVariablePrefix}}{{paramName}}; private final {{{dataType}}} {{paramName}};
{{/requiredParams}} {{/requiredParams}}
{{#optionalParams}} {{#optionalParams}}
private {{{dataType}}} {{localVariablePrefix}}{{paramName}}; private {{{dataType}}} {{paramName}};
{{/optionalParams}} {{/optionalParams}}
private API{{operationId}}Request({{#requiredParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/requiredParams}}) { private API{{operationId}}Request({{#requiredParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/requiredParams}}) {
{{#requiredParams}} {{#requiredParams}}
this.{{localVariablePrefix}}{{paramName}} = {{paramName}}; this.{{paramName}} = {{paramName}};
{{/requiredParams}} {{/requiredParams}}
} }
@ -299,15 +299,15 @@ public class {{classname}} {
* @return API{{operationId}}Request * @return API{{operationId}}Request
*/ */
public API{{operationId}}Request {{paramName}}({{{dataType}}} {{paramName}}) { public API{{operationId}}Request {{paramName}}({{{dataType}}} {{paramName}}) {
this.{{localVariablePrefix}}{{paramName}} = {{paramName}}; this.{{paramName}} = {{paramName}};
return this; return this;
} }
{{/optionalParams}} {{/optionalParams}}
/** /**
* Build call for {{operationId}} * Build call for {{operationId}}
* @param progressListener Progress listener * @param _progressListener Progress listener
* @param progressRequestListener Progress request listener * @param _progressRequestListener Progress request listener
* @return Call to execute * @return Call to execute
* @throws ApiException If fail to serialize the request body object * @throws ApiException If fail to serialize the request body object
{{#isDeprecated}} {{#isDeprecated}}
@ -317,8 +317,8 @@ public class {{classname}} {
{{#isDeprecated}} {{#isDeprecated}}
@Deprecated @Deprecated
{{/isDeprecated}} {{/isDeprecated}}
public okhttp3.Call buildCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { public okhttp3.Call buildCall(final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
return {{operationId}}Call({{#allParams}}{{localVariablePrefix}}{{paramName}}, {{/allParams}}progressListener, progressRequestListener); return {{operationId}}Call({{#allParams}}{{paramName}}, {{/allParams}}_progressListener, _progressRequestListener);
} }
/** /**
@ -333,8 +333,8 @@ public class {{classname}} {
@Deprecated @Deprecated
{{/isDeprecated}} {{/isDeprecated}}
public {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} execute() throws ApiException { public {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} execute() throws ApiException {
{{#returnType}}ApiResponse<{{{returnType}}}> {{localVariablePrefix}}resp = {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}} {{#returnType}}ApiResponse<{{{returnType}}}> localVarResp = {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}}
return {{localVariablePrefix}}resp.getData();{{/returnType}} return localVarResp.getData();{{/returnType}}
} }
/** /**
@ -349,12 +349,12 @@ public class {{classname}} {
@Deprecated @Deprecated
{{/isDeprecated}} {{/isDeprecated}}
public ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> executeWithHttpInfo() throws ApiException { 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) * 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 * @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object * @throws ApiException If fail to process the API call, e.g. serializing the request body object
{{#isDeprecated}} {{#isDeprecated}}
@ -364,8 +364,8 @@ public class {{classname}} {
{{#isDeprecated}} {{#isDeprecated}}
@Deprecated @Deprecated
{{/isDeprecated}} {{/isDeprecated}}
public okhttp3.Call executeAsync(final ApiCallback<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> callback) throws ApiException { public okhttp3.Call executeAsync(final ApiCallback<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> _callback) throws ApiException {
return {{operationId}}Async({{#allParams}}{{localVariablePrefix}}{{paramName}}, {{/allParams}}callback); return {{operationId}}Async({{#allParams}}{{paramName}}, {{/allParams}}_callback);
} }
} }

View File

@ -36,33 +36,33 @@ import java.util.List;
import java.util.Map; import java.util.Map;
public class AnotherFakeApi { public class AnotherFakeApi {
private ApiClient apiClient; private ApiClient localVarApiClient;
public AnotherFakeApi() { public AnotherFakeApi() {
this(Configuration.getDefaultApiClient()); this(Configuration.getDefaultApiClient());
} }
public AnotherFakeApi(ApiClient apiClient) { public AnotherFakeApi(ApiClient apiClient) {
this.apiClient = apiClient; this.localVarApiClient = apiClient;
} }
public ApiClient getApiClient() { public ApiClient getApiClient() {
return apiClient; return localVarApiClient;
} }
public void setApiClient(ApiClient apiClient) { public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient; this.localVarApiClient = apiClient;
} }
/** /**
* Build call for call123testSpecialTags * Build call for call123testSpecialTags
* @param body client model (required) * @param body client model (required)
* @param progressListener Progress listener * @param _progressListener Progress listener
* @param progressRequestListener Progress request listener * @param _progressRequestListener Progress request listener
* @return Call to execute * @return Call to execute
* @throws ApiException If fail to serialize the request body object * @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; Object localVarPostBody = body;
// create path and map variables // create path and map variables
@ -75,7 +75,7 @@ public class AnotherFakeApi {
final String[] localVarAccepts = { final String[] localVarAccepts = {
"application/json" "application/json"
}; };
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) { if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept); localVarHeaderParams.put("Accept", localVarAccept);
} }
@ -83,27 +83,27 @@ public class AnotherFakeApi {
final String[] localVarContentTypes = { final String[] localVarContentTypes = {
"application/json" "application/json"
}; };
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType); localVarHeaderParams.put("Content-Type", localVarContentType);
if (progressListener != null) { if (_progressListener != null) {
apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
@Override @Override
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException { public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
okhttp3.Response originalResponse = chain.proceed(chain.request()); okhttp3.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder() return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener)) .body(new ProgressResponseBody(originalResponse.body(), _progressListener))
.build(); .build();
} }
}).build()); }).build());
} }
String[] localVarAuthNames = new String[] { }; 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") @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 // verify the required parameter 'body' is set
if (body == null) { if (body == null) {
@ -111,8 +111,8 @@ public class AnotherFakeApi {
} }
okhttp3.Call call = call123testSpecialTagsCall(body, progressListener, progressRequestListener); okhttp3.Call localVarCall = call123testSpecialTagsCall(body, _progressListener, _progressRequestListener);
return call; 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 * @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 { public Client call123testSpecialTags(Client body) throws ApiException {
ApiResponse<Client> resp = call123testSpecialTagsWithHttpInfo(body); ApiResponse<Client> localVarResp = call123testSpecialTagsWithHttpInfo(body);
return resp.getData(); 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 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/ */
public ApiResponse<Client> call123testSpecialTagsWithHttpInfo(Client body) throws ApiException { public ApiResponse<Client> call123testSpecialTagsWithHttpInfo(Client body) throws ApiException {
okhttp3.Call call = call123testSpecialTagsValidateBeforeCall(body, null, null); okhttp3.Call localVarCall = call123testSpecialTagsValidateBeforeCall(body, null, null);
Type localVarReturnType = new TypeToken<Client>(){}.getType(); Type localVarReturnType = new TypeToken<Client>(){}.getType();
return apiClient.execute(call, localVarReturnType); return localVarApiClient.execute(localVarCall, localVarReturnType);
} }
/** /**
* To test special tags (asynchronously) * To test special tags (asynchronously)
* To test special tags and operation ID starting with number * To test special tags and operation ID starting with number
* @param body client model (required) * @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 * @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object * @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/ */
public okhttp3.Call call123testSpecialTagsAsync(Client body, final ApiCallback<Client> callback) throws ApiException { public okhttp3.Call call123testSpecialTagsAsync(Client body, final ApiCallback<Client> _callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null; ProgressResponseBody.ProgressListener _progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null; ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
if (callback != null) { if (_callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() { _progressListener = new ProgressResponseBody.ProgressListener() {
@Override @Override
public void update(long bytesRead, long contentLength, boolean done) { 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 @Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { 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<Client>(){}.getType(); Type localVarReturnType = new TypeToken<Client>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return call; return localVarCall;
} }
} }

View File

@ -36,33 +36,33 @@ import java.util.List;
import java.util.Map; import java.util.Map;
public class FakeClassnameTags123Api { public class FakeClassnameTags123Api {
private ApiClient apiClient; private ApiClient localVarApiClient;
public FakeClassnameTags123Api() { public FakeClassnameTags123Api() {
this(Configuration.getDefaultApiClient()); this(Configuration.getDefaultApiClient());
} }
public FakeClassnameTags123Api(ApiClient apiClient) { public FakeClassnameTags123Api(ApiClient apiClient) {
this.apiClient = apiClient; this.localVarApiClient = apiClient;
} }
public ApiClient getApiClient() { public ApiClient getApiClient() {
return apiClient; return localVarApiClient;
} }
public void setApiClient(ApiClient apiClient) { public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient; this.localVarApiClient = apiClient;
} }
/** /**
* Build call for testClassname * Build call for testClassname
* @param body client model (required) * @param body client model (required)
* @param progressListener Progress listener * @param _progressListener Progress listener
* @param progressRequestListener Progress request listener * @param _progressRequestListener Progress request listener
* @return Call to execute * @return Call to execute
* @throws ApiException If fail to serialize the request body object * @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; Object localVarPostBody = body;
// create path and map variables // create path and map variables
@ -75,7 +75,7 @@ public class FakeClassnameTags123Api {
final String[] localVarAccepts = { final String[] localVarAccepts = {
"application/json" "application/json"
}; };
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) { if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept); localVarHeaderParams.put("Accept", localVarAccept);
} }
@ -83,27 +83,27 @@ public class FakeClassnameTags123Api {
final String[] localVarContentTypes = { final String[] localVarContentTypes = {
"application/json" "application/json"
}; };
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType); localVarHeaderParams.put("Content-Type", localVarContentType);
if (progressListener != null) { if (_progressListener != null) {
apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
@Override @Override
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException { public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
okhttp3.Response originalResponse = chain.proceed(chain.request()); okhttp3.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder() return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener)) .body(new ProgressResponseBody(originalResponse.body(), _progressListener))
.build(); .build();
} }
}).build()); }).build());
} }
String[] localVarAuthNames = new String[] { "api_key_query" }; 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") @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 // verify the required parameter 'body' is set
if (body == null) { if (body == null) {
@ -111,8 +111,8 @@ public class FakeClassnameTags123Api {
} }
okhttp3.Call call = testClassnameCall(body, progressListener, progressRequestListener); okhttp3.Call localVarCall = testClassnameCall(body, _progressListener, _progressRequestListener);
return call; 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 * @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 { public Client testClassname(Client body) throws ApiException {
ApiResponse<Client> resp = testClassnameWithHttpInfo(body); ApiResponse<Client> localVarResp = testClassnameWithHttpInfo(body);
return resp.getData(); 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 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/ */
public ApiResponse<Client> testClassnameWithHttpInfo(Client body) throws ApiException { public ApiResponse<Client> testClassnameWithHttpInfo(Client body) throws ApiException {
okhttp3.Call call = testClassnameValidateBeforeCall(body, null, null); okhttp3.Call localVarCall = testClassnameValidateBeforeCall(body, null, null);
Type localVarReturnType = new TypeToken<Client>(){}.getType(); Type localVarReturnType = new TypeToken<Client>(){}.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 (asynchronously)
* To test class name in snake case * To test class name in snake case
* @param body client model (required) * @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 * @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object * @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/ */
public okhttp3.Call testClassnameAsync(Client body, final ApiCallback<Client> callback) throws ApiException { public okhttp3.Call testClassnameAsync(Client body, final ApiCallback<Client> _callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null; ProgressResponseBody.ProgressListener _progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null; ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
if (callback != null) { if (_callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() { _progressListener = new ProgressResponseBody.ProgressListener() {
@Override @Override
public void update(long bytesRead, long contentLength, boolean done) { 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 @Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { 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<Client>(){}.getType(); Type localVarReturnType = new TypeToken<Client>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return call; return localVarCall;
} }
} }

View File

@ -36,38 +36,38 @@ import java.util.List;
import java.util.Map; import java.util.Map;
public class StoreApi { public class StoreApi {
private ApiClient apiClient; private ApiClient localVarApiClient;
public StoreApi() { public StoreApi() {
this(Configuration.getDefaultApiClient()); this(Configuration.getDefaultApiClient());
} }
public StoreApi(ApiClient apiClient) { public StoreApi(ApiClient apiClient) {
this.apiClient = apiClient; this.localVarApiClient = apiClient;
} }
public ApiClient getApiClient() { public ApiClient getApiClient() {
return apiClient; return localVarApiClient;
} }
public void setApiClient(ApiClient apiClient) { public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient; this.localVarApiClient = apiClient;
} }
/** /**
* Build call for deleteOrder * Build call for deleteOrder
* @param orderId ID of the order that needs to be deleted (required) * @param orderId ID of the order that needs to be deleted (required)
* @param progressListener Progress listener * @param _progressListener Progress listener
* @param progressRequestListener Progress request listener * @param _progressRequestListener Progress request listener
* @return Call to execute * @return Call to execute
* @throws ApiException If fail to serialize the request body object * @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(); Object localVarPostBody = new Object();
// create path and map variables // create path and map variables
String localVarPath = "/store/order/{order_id}" String localVarPath = "/store/order/{order_id}"
.replaceAll("\\{" + "order_id" + "\\}", apiClient.escapeString(orderId.toString())); .replaceAll("\\{" + "order_id" + "\\}", localVarApiClient.escapeString(orderId.toString()));
List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarQueryParams = new ArrayList<Pair>();
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
@ -76,7 +76,7 @@ public class StoreApi {
final String[] localVarAccepts = { final String[] localVarAccepts = {
}; };
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) { if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept); localVarHeaderParams.put("Accept", localVarAccept);
} }
@ -84,27 +84,27 @@ public class StoreApi {
final String[] localVarContentTypes = { final String[] localVarContentTypes = {
}; };
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType); localVarHeaderParams.put("Content-Type", localVarContentType);
if (progressListener != null) { if (_progressListener != null) {
apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
@Override @Override
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException { public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
okhttp3.Response originalResponse = chain.proceed(chain.request()); okhttp3.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder() return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener)) .body(new ProgressResponseBody(originalResponse.body(), _progressListener))
.build(); .build();
} }
}).build()); }).build());
} }
String[] localVarAuthNames = new String[] { }; 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") @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 // verify the required parameter 'orderId' is set
if (orderId == null) { if (orderId == null) {
@ -112,8 +112,8 @@ public class StoreApi {
} }
okhttp3.Call call = deleteOrderCall(orderId, progressListener, progressRequestListener); okhttp3.Call localVarCall = deleteOrderCall(orderId, _progressListener, _progressRequestListener);
return call; 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 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/ */
public ApiResponse<Void> deleteOrderWithHttpInfo(String orderId) throws ApiException { public ApiResponse<Void> deleteOrderWithHttpInfo(String orderId) throws ApiException {
okhttp3.Call call = deleteOrderValidateBeforeCall(orderId, null, null); okhttp3.Call localVarCall = deleteOrderValidateBeforeCall(orderId, null, null);
return apiClient.execute(call); return localVarApiClient.execute(localVarCall);
} }
/** /**
* Delete purchase order by ID (asynchronously) * Delete purchase order by ID (asynchronously)
* For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors * For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
* @param orderId ID of the order that needs to be deleted (required) * @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 * @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object * @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/ */
public okhttp3.Call deleteOrderAsync(String orderId, final ApiCallback<Void> callback) throws ApiException { public okhttp3.Call deleteOrderAsync(String orderId, final ApiCallback<Void> _callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null; ProgressResponseBody.ProgressListener _progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null; ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
if (callback != null) { if (_callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() { _progressListener = new ProgressResponseBody.ProgressListener() {
@Override @Override
public void update(long bytesRead, long contentLength, boolean done) { 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 @Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { 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); okhttp3.Call localVarCall = deleteOrderValidateBeforeCall(orderId, _progressListener, _progressRequestListener);
apiClient.executeAsync(call, callback); localVarApiClient.executeAsync(localVarCall, _callback);
return call; return localVarCall;
} }
/** /**
* Build call for getInventory * Build call for getInventory
* @param progressListener Progress listener * @param _progressListener Progress listener
* @param progressRequestListener Progress request listener * @param _progressRequestListener Progress request listener
* @return Call to execute * @return Call to execute
* @throws ApiException If fail to serialize the request body object * @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(); Object localVarPostBody = new Object();
// create path and map variables // create path and map variables
@ -192,7 +192,7 @@ public class StoreApi {
final String[] localVarAccepts = { final String[] localVarAccepts = {
"application/json" "application/json"
}; };
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) { if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept); localVarHeaderParams.put("Accept", localVarAccept);
} }
@ -200,31 +200,31 @@ public class StoreApi {
final String[] localVarContentTypes = { final String[] localVarContentTypes = {
}; };
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType); localVarHeaderParams.put("Content-Type", localVarContentType);
if (progressListener != null) { if (_progressListener != null) {
apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
@Override @Override
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException { public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
okhttp3.Response originalResponse = chain.proceed(chain.request()); okhttp3.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder() return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener)) .body(new ProgressResponseBody(originalResponse.body(), _progressListener))
.build(); .build();
} }
}).build()); }).build());
} }
String[] localVarAuthNames = new String[] { "api_key" }; 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") @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); okhttp3.Call localVarCall = getInventoryCall(_progressListener, _progressRequestListener);
return call; 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 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/ */
public Map<String, Integer> getInventory() throws ApiException { public Map<String, Integer> getInventory() throws ApiException {
ApiResponse<Map<String, Integer>> resp = getInventoryWithHttpInfo(); ApiResponse<Map<String, Integer>> localVarResp = getInventoryWithHttpInfo();
return resp.getData(); 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 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/ */
public ApiResponse<Map<String, Integer>> getInventoryWithHttpInfo() throws ApiException { public ApiResponse<Map<String, Integer>> getInventoryWithHttpInfo() throws ApiException {
okhttp3.Call call = getInventoryValidateBeforeCall(null, null); okhttp3.Call localVarCall = getInventoryValidateBeforeCall(null, null);
Type localVarReturnType = new TypeToken<Map<String, Integer>>(){}.getType(); Type localVarReturnType = new TypeToken<Map<String, Integer>>(){}.getType();
return apiClient.execute(call, localVarReturnType); return localVarApiClient.execute(localVarCall, localVarReturnType);
} }
/** /**
* Returns pet inventories by status (asynchronously) * Returns pet inventories by status (asynchronously)
* Returns a map of status codes to quantities * 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 * @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object * @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/ */
public okhttp3.Call getInventoryAsync(final ApiCallback<Map<String, Integer>> callback) throws ApiException { public okhttp3.Call getInventoryAsync(final ApiCallback<Map<String, Integer>> _callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null; ProgressResponseBody.ProgressListener _progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null; ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
if (callback != null) { if (_callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() { _progressListener = new ProgressResponseBody.ProgressListener() {
@Override @Override
public void update(long bytesRead, long contentLength, boolean done) { 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 @Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { 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<Map<String, Integer>>(){}.getType(); Type localVarReturnType = new TypeToken<Map<String, Integer>>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return call; return localVarCall;
} }
/** /**
* Build call for getOrderById * Build call for getOrderById
* @param orderId ID of pet that needs to be fetched (required) * @param orderId ID of pet that needs to be fetched (required)
* @param progressListener Progress listener * @param _progressListener Progress listener
* @param progressRequestListener Progress request listener * @param _progressRequestListener Progress request listener
* @return Call to execute * @return Call to execute
* @throws ApiException If fail to serialize the request body object * @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(); Object localVarPostBody = new Object();
// create path and map variables // create path and map variables
String localVarPath = "/store/order/{order_id}" String localVarPath = "/store/order/{order_id}"
.replaceAll("\\{" + "order_id" + "\\}", apiClient.escapeString(orderId.toString())); .replaceAll("\\{" + "order_id" + "\\}", localVarApiClient.escapeString(orderId.toString()));
List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarQueryParams = new ArrayList<Pair>();
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
@ -306,7 +306,7 @@ public class StoreApi {
final String[] localVarAccepts = { final String[] localVarAccepts = {
"application/xml", "application/json" "application/xml", "application/json"
}; };
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) { if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept); localVarHeaderParams.put("Accept", localVarAccept);
} }
@ -314,27 +314,27 @@ public class StoreApi {
final String[] localVarContentTypes = { final String[] localVarContentTypes = {
}; };
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType); localVarHeaderParams.put("Content-Type", localVarContentType);
if (progressListener != null) { if (_progressListener != null) {
apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
@Override @Override
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException { public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
okhttp3.Response originalResponse = chain.proceed(chain.request()); okhttp3.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder() return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener)) .body(new ProgressResponseBody(originalResponse.body(), _progressListener))
.build(); .build();
} }
}).build()); }).build());
} }
String[] localVarAuthNames = new String[] { }; 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") @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 // verify the required parameter 'orderId' is set
if (orderId == null) { if (orderId == null) {
@ -342,8 +342,8 @@ public class StoreApi {
} }
okhttp3.Call call = getOrderByIdCall(orderId, progressListener, progressRequestListener); okhttp3.Call localVarCall = getOrderByIdCall(orderId, _progressListener, _progressRequestListener);
return call; 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 * @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 { public Order getOrderById(Long orderId) throws ApiException {
ApiResponse<Order> resp = getOrderByIdWithHttpInfo(orderId); ApiResponse<Order> localVarResp = getOrderByIdWithHttpInfo(orderId);
return resp.getData(); 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 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/ */
public ApiResponse<Order> getOrderByIdWithHttpInfo(Long orderId) throws ApiException { public ApiResponse<Order> getOrderByIdWithHttpInfo(Long orderId) throws ApiException {
okhttp3.Call call = getOrderByIdValidateBeforeCall(orderId, null, null); okhttp3.Call localVarCall = getOrderByIdValidateBeforeCall(orderId, null, null);
Type localVarReturnType = new TypeToken<Order>(){}.getType(); Type localVarReturnType = new TypeToken<Order>(){}.getType();
return apiClient.execute(call, localVarReturnType); return localVarApiClient.execute(localVarCall, localVarReturnType);
} }
/** /**
* Find purchase order by ID (asynchronously) * Find purchase order by ID (asynchronously)
* For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions * For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
* @param orderId ID of pet that needs to be fetched (required) * @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 * @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object * @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/ */
public okhttp3.Call getOrderByIdAsync(Long orderId, final ApiCallback<Order> callback) throws ApiException { public okhttp3.Call getOrderByIdAsync(Long orderId, final ApiCallback<Order> _callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null; ProgressResponseBody.ProgressListener _progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null; ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
if (callback != null) { if (_callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() { _progressListener = new ProgressResponseBody.ProgressListener() {
@Override @Override
public void update(long bytesRead, long contentLength, boolean done) { 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 @Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { 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<Order>(){}.getType(); Type localVarReturnType = new TypeToken<Order>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return call; return localVarCall;
} }
/** /**
* Build call for placeOrder * Build call for placeOrder
* @param body order placed for purchasing the pet (required) * @param body order placed for purchasing the pet (required)
* @param progressListener Progress listener * @param _progressListener Progress listener
* @param progressRequestListener Progress request listener * @param _progressRequestListener Progress request listener
* @return Call to execute * @return Call to execute
* @throws ApiException If fail to serialize the request body object * @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; Object localVarPostBody = body;
// create path and map variables // create path and map variables
@ -427,7 +427,7 @@ public class StoreApi {
final String[] localVarAccepts = { final String[] localVarAccepts = {
"application/xml", "application/json" "application/xml", "application/json"
}; };
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) { if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept); localVarHeaderParams.put("Accept", localVarAccept);
} }
@ -435,27 +435,27 @@ public class StoreApi {
final String[] localVarContentTypes = { final String[] localVarContentTypes = {
}; };
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType); localVarHeaderParams.put("Content-Type", localVarContentType);
if (progressListener != null) { if (_progressListener != null) {
apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
@Override @Override
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException { public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
okhttp3.Response originalResponse = chain.proceed(chain.request()); okhttp3.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder() return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener)) .body(new ProgressResponseBody(originalResponse.body(), _progressListener))
.build(); .build();
} }
}).build()); }).build());
} }
String[] localVarAuthNames = new String[] { }; 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") @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 // verify the required parameter 'body' is set
if (body == null) { if (body == null) {
@ -463,8 +463,8 @@ public class StoreApi {
} }
okhttp3.Call call = placeOrderCall(body, progressListener, progressRequestListener); okhttp3.Call localVarCall = placeOrderCall(body, _progressListener, _progressRequestListener);
return call; 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 * @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 { public Order placeOrder(Order body) throws ApiException {
ApiResponse<Order> resp = placeOrderWithHttpInfo(body); ApiResponse<Order> localVarResp = placeOrderWithHttpInfo(body);
return resp.getData(); 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 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/ */
public ApiResponse<Order> placeOrderWithHttpInfo(Order body) throws ApiException { public ApiResponse<Order> placeOrderWithHttpInfo(Order body) throws ApiException {
okhttp3.Call call = placeOrderValidateBeforeCall(body, null, null); okhttp3.Call localVarCall = placeOrderValidateBeforeCall(body, null, null);
Type localVarReturnType = new TypeToken<Order>(){}.getType(); Type localVarReturnType = new TypeToken<Order>(){}.getType();
return apiClient.execute(call, localVarReturnType); return localVarApiClient.execute(localVarCall, localVarReturnType);
} }
/** /**
* Place an order for a pet (asynchronously) * Place an order for a pet (asynchronously)
* *
* @param body order placed for purchasing the pet (required) * @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 * @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object * @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/ */
public okhttp3.Call placeOrderAsync(Order body, final ApiCallback<Order> callback) throws ApiException { public okhttp3.Call placeOrderAsync(Order body, final ApiCallback<Order> _callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null; ProgressResponseBody.ProgressListener _progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null; ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
if (callback != null) { if (_callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() { _progressListener = new ProgressResponseBody.ProgressListener() {
@Override @Override
public void update(long bytesRead, long contentLength, boolean done) { 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 @Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { 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<Order>(){}.getType(); Type localVarReturnType = new TypeToken<Order>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return call; return localVarCall;
} }
} }

View File

@ -36,33 +36,33 @@ import java.util.List;
import java.util.Map; import java.util.Map;
public class AnotherFakeApi { public class AnotherFakeApi {
private ApiClient apiClient; private ApiClient localVarApiClient;
public AnotherFakeApi() { public AnotherFakeApi() {
this(Configuration.getDefaultApiClient()); this(Configuration.getDefaultApiClient());
} }
public AnotherFakeApi(ApiClient apiClient) { public AnotherFakeApi(ApiClient apiClient) {
this.apiClient = apiClient; this.localVarApiClient = apiClient;
} }
public ApiClient getApiClient() { public ApiClient getApiClient() {
return apiClient; return localVarApiClient;
} }
public void setApiClient(ApiClient apiClient) { public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient; this.localVarApiClient = apiClient;
} }
/** /**
* Build call for call123testSpecialTags * Build call for call123testSpecialTags
* @param body client model (required) * @param body client model (required)
* @param progressListener Progress listener * @param _progressListener Progress listener
* @param progressRequestListener Progress request listener * @param _progressRequestListener Progress request listener
* @return Call to execute * @return Call to execute
* @throws ApiException If fail to serialize the request body object * @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; Object localVarPostBody = body;
// create path and map variables // create path and map variables
@ -75,7 +75,7 @@ public class AnotherFakeApi {
final String[] localVarAccepts = { final String[] localVarAccepts = {
"application/json" "application/json"
}; };
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) { if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept); localVarHeaderParams.put("Accept", localVarAccept);
} }
@ -83,27 +83,27 @@ public class AnotherFakeApi {
final String[] localVarContentTypes = { final String[] localVarContentTypes = {
"application/json" "application/json"
}; };
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType); localVarHeaderParams.put("Content-Type", localVarContentType);
if (progressListener != null) { if (_progressListener != null) {
apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
@Override @Override
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException { public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
okhttp3.Response originalResponse = chain.proceed(chain.request()); okhttp3.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder() return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener)) .body(new ProgressResponseBody(originalResponse.body(), _progressListener))
.build(); .build();
} }
}).build()); }).build());
} }
String[] localVarAuthNames = new String[] { }; 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") @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 // verify the required parameter 'body' is set
if (body == null) { if (body == null) {
@ -111,8 +111,8 @@ public class AnotherFakeApi {
} }
okhttp3.Call call = call123testSpecialTagsCall(body, progressListener, progressRequestListener); okhttp3.Call localVarCall = call123testSpecialTagsCall(body, _progressListener, _progressRequestListener);
return call; 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 * @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 { public Client call123testSpecialTags(Client body) throws ApiException {
ApiResponse<Client> resp = call123testSpecialTagsWithHttpInfo(body); ApiResponse<Client> localVarResp = call123testSpecialTagsWithHttpInfo(body);
return resp.getData(); 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 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/ */
public ApiResponse<Client> call123testSpecialTagsWithHttpInfo(Client body) throws ApiException { public ApiResponse<Client> call123testSpecialTagsWithHttpInfo(Client body) throws ApiException {
okhttp3.Call call = call123testSpecialTagsValidateBeforeCall(body, null, null); okhttp3.Call localVarCall = call123testSpecialTagsValidateBeforeCall(body, null, null);
Type localVarReturnType = new TypeToken<Client>(){}.getType(); Type localVarReturnType = new TypeToken<Client>(){}.getType();
return apiClient.execute(call, localVarReturnType); return localVarApiClient.execute(localVarCall, localVarReturnType);
} }
/** /**
* To test special tags (asynchronously) * To test special tags (asynchronously)
* To test special tags and operation ID starting with number * To test special tags and operation ID starting with number
* @param body client model (required) * @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 * @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object * @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/ */
public okhttp3.Call call123testSpecialTagsAsync(Client body, final ApiCallback<Client> callback) throws ApiException { public okhttp3.Call call123testSpecialTagsAsync(Client body, final ApiCallback<Client> _callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null; ProgressResponseBody.ProgressListener _progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null; ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
if (callback != null) { if (_callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() { _progressListener = new ProgressResponseBody.ProgressListener() {
@Override @Override
public void update(long bytesRead, long contentLength, boolean done) { 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 @Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { 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<Client>(){}.getType(); Type localVarReturnType = new TypeToken<Client>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return call; return localVarCall;
} }
} }

View File

@ -36,33 +36,33 @@ import java.util.List;
import java.util.Map; import java.util.Map;
public class FakeClassnameTags123Api { public class FakeClassnameTags123Api {
private ApiClient apiClient; private ApiClient localVarApiClient;
public FakeClassnameTags123Api() { public FakeClassnameTags123Api() {
this(Configuration.getDefaultApiClient()); this(Configuration.getDefaultApiClient());
} }
public FakeClassnameTags123Api(ApiClient apiClient) { public FakeClassnameTags123Api(ApiClient apiClient) {
this.apiClient = apiClient; this.localVarApiClient = apiClient;
} }
public ApiClient getApiClient() { public ApiClient getApiClient() {
return apiClient; return localVarApiClient;
} }
public void setApiClient(ApiClient apiClient) { public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient; this.localVarApiClient = apiClient;
} }
/** /**
* Build call for testClassname * Build call for testClassname
* @param body client model (required) * @param body client model (required)
* @param progressListener Progress listener * @param _progressListener Progress listener
* @param progressRequestListener Progress request listener * @param _progressRequestListener Progress request listener
* @return Call to execute * @return Call to execute
* @throws ApiException If fail to serialize the request body object * @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; Object localVarPostBody = body;
// create path and map variables // create path and map variables
@ -75,7 +75,7 @@ public class FakeClassnameTags123Api {
final String[] localVarAccepts = { final String[] localVarAccepts = {
"application/json" "application/json"
}; };
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) { if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept); localVarHeaderParams.put("Accept", localVarAccept);
} }
@ -83,27 +83,27 @@ public class FakeClassnameTags123Api {
final String[] localVarContentTypes = { final String[] localVarContentTypes = {
"application/json" "application/json"
}; };
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType); localVarHeaderParams.put("Content-Type", localVarContentType);
if (progressListener != null) { if (_progressListener != null) {
apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
@Override @Override
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException { public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
okhttp3.Response originalResponse = chain.proceed(chain.request()); okhttp3.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder() return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener)) .body(new ProgressResponseBody(originalResponse.body(), _progressListener))
.build(); .build();
} }
}).build()); }).build());
} }
String[] localVarAuthNames = new String[] { "api_key_query" }; 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") @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 // verify the required parameter 'body' is set
if (body == null) { if (body == null) {
@ -111,8 +111,8 @@ public class FakeClassnameTags123Api {
} }
okhttp3.Call call = testClassnameCall(body, progressListener, progressRequestListener); okhttp3.Call localVarCall = testClassnameCall(body, _progressListener, _progressRequestListener);
return call; 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 * @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 { public Client testClassname(Client body) throws ApiException {
ApiResponse<Client> resp = testClassnameWithHttpInfo(body); ApiResponse<Client> localVarResp = testClassnameWithHttpInfo(body);
return resp.getData(); 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 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/ */
public ApiResponse<Client> testClassnameWithHttpInfo(Client body) throws ApiException { public ApiResponse<Client> testClassnameWithHttpInfo(Client body) throws ApiException {
okhttp3.Call call = testClassnameValidateBeforeCall(body, null, null); okhttp3.Call localVarCall = testClassnameValidateBeforeCall(body, null, null);
Type localVarReturnType = new TypeToken<Client>(){}.getType(); Type localVarReturnType = new TypeToken<Client>(){}.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 (asynchronously)
* To test class name in snake case * To test class name in snake case
* @param body client model (required) * @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 * @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object * @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/ */
public okhttp3.Call testClassnameAsync(Client body, final ApiCallback<Client> callback) throws ApiException { public okhttp3.Call testClassnameAsync(Client body, final ApiCallback<Client> _callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null; ProgressResponseBody.ProgressListener _progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null; ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
if (callback != null) { if (_callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() { _progressListener = new ProgressResponseBody.ProgressListener() {
@Override @Override
public void update(long bytesRead, long contentLength, boolean done) { 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 @Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { 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<Client>(){}.getType(); Type localVarReturnType = new TypeToken<Client>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return call; return localVarCall;
} }
} }

View File

@ -36,38 +36,38 @@ import java.util.List;
import java.util.Map; import java.util.Map;
public class StoreApi { public class StoreApi {
private ApiClient apiClient; private ApiClient localVarApiClient;
public StoreApi() { public StoreApi() {
this(Configuration.getDefaultApiClient()); this(Configuration.getDefaultApiClient());
} }
public StoreApi(ApiClient apiClient) { public StoreApi(ApiClient apiClient) {
this.apiClient = apiClient; this.localVarApiClient = apiClient;
} }
public ApiClient getApiClient() { public ApiClient getApiClient() {
return apiClient; return localVarApiClient;
} }
public void setApiClient(ApiClient apiClient) { public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient; this.localVarApiClient = apiClient;
} }
/** /**
* Build call for deleteOrder * Build call for deleteOrder
* @param orderId ID of the order that needs to be deleted (required) * @param orderId ID of the order that needs to be deleted (required)
* @param progressListener Progress listener * @param _progressListener Progress listener
* @param progressRequestListener Progress request listener * @param _progressRequestListener Progress request listener
* @return Call to execute * @return Call to execute
* @throws ApiException If fail to serialize the request body object * @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(); Object localVarPostBody = new Object();
// create path and map variables // create path and map variables
String localVarPath = "/store/order/{order_id}" String localVarPath = "/store/order/{order_id}"
.replaceAll("\\{" + "order_id" + "\\}", apiClient.escapeString(orderId.toString())); .replaceAll("\\{" + "order_id" + "\\}", localVarApiClient.escapeString(orderId.toString()));
List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarQueryParams = new ArrayList<Pair>();
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
@ -76,7 +76,7 @@ public class StoreApi {
final String[] localVarAccepts = { final String[] localVarAccepts = {
}; };
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) { if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept); localVarHeaderParams.put("Accept", localVarAccept);
} }
@ -84,27 +84,27 @@ public class StoreApi {
final String[] localVarContentTypes = { final String[] localVarContentTypes = {
}; };
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType); localVarHeaderParams.put("Content-Type", localVarContentType);
if (progressListener != null) { if (_progressListener != null) {
apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
@Override @Override
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException { public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
okhttp3.Response originalResponse = chain.proceed(chain.request()); okhttp3.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder() return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener)) .body(new ProgressResponseBody(originalResponse.body(), _progressListener))
.build(); .build();
} }
}).build()); }).build());
} }
String[] localVarAuthNames = new String[] { }; 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") @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 // verify the required parameter 'orderId' is set
if (orderId == null) { if (orderId == null) {
@ -112,8 +112,8 @@ public class StoreApi {
} }
okhttp3.Call call = deleteOrderCall(orderId, progressListener, progressRequestListener); okhttp3.Call localVarCall = deleteOrderCall(orderId, _progressListener, _progressRequestListener);
return call; 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 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/ */
public ApiResponse<Void> deleteOrderWithHttpInfo(String orderId) throws ApiException { public ApiResponse<Void> deleteOrderWithHttpInfo(String orderId) throws ApiException {
okhttp3.Call call = deleteOrderValidateBeforeCall(orderId, null, null); okhttp3.Call localVarCall = deleteOrderValidateBeforeCall(orderId, null, null);
return apiClient.execute(call); return localVarApiClient.execute(localVarCall);
} }
/** /**
* Delete purchase order by ID (asynchronously) * Delete purchase order by ID (asynchronously)
* For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors * For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
* @param orderId ID of the order that needs to be deleted (required) * @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 * @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object * @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/ */
public okhttp3.Call deleteOrderAsync(String orderId, final ApiCallback<Void> callback) throws ApiException { public okhttp3.Call deleteOrderAsync(String orderId, final ApiCallback<Void> _callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null; ProgressResponseBody.ProgressListener _progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null; ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
if (callback != null) { if (_callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() { _progressListener = new ProgressResponseBody.ProgressListener() {
@Override @Override
public void update(long bytesRead, long contentLength, boolean done) { 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 @Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { 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); okhttp3.Call localVarCall = deleteOrderValidateBeforeCall(orderId, _progressListener, _progressRequestListener);
apiClient.executeAsync(call, callback); localVarApiClient.executeAsync(localVarCall, _callback);
return call; return localVarCall;
} }
/** /**
* Build call for getInventory * Build call for getInventory
* @param progressListener Progress listener * @param _progressListener Progress listener
* @param progressRequestListener Progress request listener * @param _progressRequestListener Progress request listener
* @return Call to execute * @return Call to execute
* @throws ApiException If fail to serialize the request body object * @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(); Object localVarPostBody = new Object();
// create path and map variables // create path and map variables
@ -192,7 +192,7 @@ public class StoreApi {
final String[] localVarAccepts = { final String[] localVarAccepts = {
"application/json" "application/json"
}; };
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) { if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept); localVarHeaderParams.put("Accept", localVarAccept);
} }
@ -200,31 +200,31 @@ public class StoreApi {
final String[] localVarContentTypes = { final String[] localVarContentTypes = {
}; };
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType); localVarHeaderParams.put("Content-Type", localVarContentType);
if (progressListener != null) { if (_progressListener != null) {
apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
@Override @Override
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException { public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
okhttp3.Response originalResponse = chain.proceed(chain.request()); okhttp3.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder() return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener)) .body(new ProgressResponseBody(originalResponse.body(), _progressListener))
.build(); .build();
} }
}).build()); }).build());
} }
String[] localVarAuthNames = new String[] { "api_key" }; 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") @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); okhttp3.Call localVarCall = getInventoryCall(_progressListener, _progressRequestListener);
return call; 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 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/ */
public Map<String, Integer> getInventory() throws ApiException { public Map<String, Integer> getInventory() throws ApiException {
ApiResponse<Map<String, Integer>> resp = getInventoryWithHttpInfo(); ApiResponse<Map<String, Integer>> localVarResp = getInventoryWithHttpInfo();
return resp.getData(); 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 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/ */
public ApiResponse<Map<String, Integer>> getInventoryWithHttpInfo() throws ApiException { public ApiResponse<Map<String, Integer>> getInventoryWithHttpInfo() throws ApiException {
okhttp3.Call call = getInventoryValidateBeforeCall(null, null); okhttp3.Call localVarCall = getInventoryValidateBeforeCall(null, null);
Type localVarReturnType = new TypeToken<Map<String, Integer>>(){}.getType(); Type localVarReturnType = new TypeToken<Map<String, Integer>>(){}.getType();
return apiClient.execute(call, localVarReturnType); return localVarApiClient.execute(localVarCall, localVarReturnType);
} }
/** /**
* Returns pet inventories by status (asynchronously) * Returns pet inventories by status (asynchronously)
* Returns a map of status codes to quantities * 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 * @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object * @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/ */
public okhttp3.Call getInventoryAsync(final ApiCallback<Map<String, Integer>> callback) throws ApiException { public okhttp3.Call getInventoryAsync(final ApiCallback<Map<String, Integer>> _callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null; ProgressResponseBody.ProgressListener _progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null; ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
if (callback != null) { if (_callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() { _progressListener = new ProgressResponseBody.ProgressListener() {
@Override @Override
public void update(long bytesRead, long contentLength, boolean done) { 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 @Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { 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<Map<String, Integer>>(){}.getType(); Type localVarReturnType = new TypeToken<Map<String, Integer>>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return call; return localVarCall;
} }
/** /**
* Build call for getOrderById * Build call for getOrderById
* @param orderId ID of pet that needs to be fetched (required) * @param orderId ID of pet that needs to be fetched (required)
* @param progressListener Progress listener * @param _progressListener Progress listener
* @param progressRequestListener Progress request listener * @param _progressRequestListener Progress request listener
* @return Call to execute * @return Call to execute
* @throws ApiException If fail to serialize the request body object * @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(); Object localVarPostBody = new Object();
// create path and map variables // create path and map variables
String localVarPath = "/store/order/{order_id}" String localVarPath = "/store/order/{order_id}"
.replaceAll("\\{" + "order_id" + "\\}", apiClient.escapeString(orderId.toString())); .replaceAll("\\{" + "order_id" + "\\}", localVarApiClient.escapeString(orderId.toString()));
List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarQueryParams = new ArrayList<Pair>();
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
@ -306,7 +306,7 @@ public class StoreApi {
final String[] localVarAccepts = { final String[] localVarAccepts = {
"application/xml", "application/json" "application/xml", "application/json"
}; };
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) { if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept); localVarHeaderParams.put("Accept", localVarAccept);
} }
@ -314,27 +314,27 @@ public class StoreApi {
final String[] localVarContentTypes = { final String[] localVarContentTypes = {
}; };
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType); localVarHeaderParams.put("Content-Type", localVarContentType);
if (progressListener != null) { if (_progressListener != null) {
apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
@Override @Override
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException { public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
okhttp3.Response originalResponse = chain.proceed(chain.request()); okhttp3.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder() return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener)) .body(new ProgressResponseBody(originalResponse.body(), _progressListener))
.build(); .build();
} }
}).build()); }).build());
} }
String[] localVarAuthNames = new String[] { }; 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") @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 // verify the required parameter 'orderId' is set
if (orderId == null) { if (orderId == null) {
@ -342,8 +342,8 @@ public class StoreApi {
} }
okhttp3.Call call = getOrderByIdCall(orderId, progressListener, progressRequestListener); okhttp3.Call localVarCall = getOrderByIdCall(orderId, _progressListener, _progressRequestListener);
return call; 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 * @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 { public Order getOrderById(Long orderId) throws ApiException {
ApiResponse<Order> resp = getOrderByIdWithHttpInfo(orderId); ApiResponse<Order> localVarResp = getOrderByIdWithHttpInfo(orderId);
return resp.getData(); 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 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/ */
public ApiResponse<Order> getOrderByIdWithHttpInfo(Long orderId) throws ApiException { public ApiResponse<Order> getOrderByIdWithHttpInfo(Long orderId) throws ApiException {
okhttp3.Call call = getOrderByIdValidateBeforeCall(orderId, null, null); okhttp3.Call localVarCall = getOrderByIdValidateBeforeCall(orderId, null, null);
Type localVarReturnType = new TypeToken<Order>(){}.getType(); Type localVarReturnType = new TypeToken<Order>(){}.getType();
return apiClient.execute(call, localVarReturnType); return localVarApiClient.execute(localVarCall, localVarReturnType);
} }
/** /**
* Find purchase order by ID (asynchronously) * Find purchase order by ID (asynchronously)
* For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions * For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
* @param orderId ID of pet that needs to be fetched (required) * @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 * @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object * @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/ */
public okhttp3.Call getOrderByIdAsync(Long orderId, final ApiCallback<Order> callback) throws ApiException { public okhttp3.Call getOrderByIdAsync(Long orderId, final ApiCallback<Order> _callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null; ProgressResponseBody.ProgressListener _progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null; ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
if (callback != null) { if (_callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() { _progressListener = new ProgressResponseBody.ProgressListener() {
@Override @Override
public void update(long bytesRead, long contentLength, boolean done) { 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 @Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { 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<Order>(){}.getType(); Type localVarReturnType = new TypeToken<Order>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return call; return localVarCall;
} }
/** /**
* Build call for placeOrder * Build call for placeOrder
* @param body order placed for purchasing the pet (required) * @param body order placed for purchasing the pet (required)
* @param progressListener Progress listener * @param _progressListener Progress listener
* @param progressRequestListener Progress request listener * @param _progressRequestListener Progress request listener
* @return Call to execute * @return Call to execute
* @throws ApiException If fail to serialize the request body object * @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; Object localVarPostBody = body;
// create path and map variables // create path and map variables
@ -427,7 +427,7 @@ public class StoreApi {
final String[] localVarAccepts = { final String[] localVarAccepts = {
"application/xml", "application/json" "application/xml", "application/json"
}; };
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) { if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept); localVarHeaderParams.put("Accept", localVarAccept);
} }
@ -435,27 +435,27 @@ public class StoreApi {
final String[] localVarContentTypes = { final String[] localVarContentTypes = {
}; };
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType); localVarHeaderParams.put("Content-Type", localVarContentType);
if (progressListener != null) { if (_progressListener != null) {
apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() { localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
@Override @Override
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException { public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
okhttp3.Response originalResponse = chain.proceed(chain.request()); okhttp3.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder() return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener)) .body(new ProgressResponseBody(originalResponse.body(), _progressListener))
.build(); .build();
} }
}).build()); }).build());
} }
String[] localVarAuthNames = new String[] { }; 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") @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 // verify the required parameter 'body' is set
if (body == null) { if (body == null) {
@ -463,8 +463,8 @@ public class StoreApi {
} }
okhttp3.Call call = placeOrderCall(body, progressListener, progressRequestListener); okhttp3.Call localVarCall = placeOrderCall(body, _progressListener, _progressRequestListener);
return call; 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 * @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 { public Order placeOrder(Order body) throws ApiException {
ApiResponse<Order> resp = placeOrderWithHttpInfo(body); ApiResponse<Order> localVarResp = placeOrderWithHttpInfo(body);
return resp.getData(); 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 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/ */
public ApiResponse<Order> placeOrderWithHttpInfo(Order body) throws ApiException { public ApiResponse<Order> placeOrderWithHttpInfo(Order body) throws ApiException {
okhttp3.Call call = placeOrderValidateBeforeCall(body, null, null); okhttp3.Call localVarCall = placeOrderValidateBeforeCall(body, null, null);
Type localVarReturnType = new TypeToken<Order>(){}.getType(); Type localVarReturnType = new TypeToken<Order>(){}.getType();
return apiClient.execute(call, localVarReturnType); return localVarApiClient.execute(localVarCall, localVarReturnType);
} }
/** /**
* Place an order for a pet (asynchronously) * Place an order for a pet (asynchronously)
* *
* @param body order placed for purchasing the pet (required) * @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 * @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object * @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/ */
public okhttp3.Call placeOrderAsync(Order body, final ApiCallback<Order> callback) throws ApiException { public okhttp3.Call placeOrderAsync(Order body, final ApiCallback<Order> _callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null; ProgressResponseBody.ProgressListener _progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null; ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
if (callback != null) { if (_callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() { _progressListener = new ProgressResponseBody.ProgressListener() {
@Override @Override
public void update(long bytesRead, long contentLength, boolean done) { 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 @Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { 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<Order>(){}.getType(); Type localVarReturnType = new TypeToken<Order>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return call; return localVarCall;
} }
} }