forked from loafle/openapi-generator-original
Java clients: better local variable naming
This commit is contained in:
parent
9f3c34dbfa
commit
9b229de79f
@ -55,8 +55,9 @@ public class JavaClientCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
setReservedWordsLowerCase(
|
setReservedWordsLowerCase(
|
||||||
Arrays.asList(
|
Arrays.asList(
|
||||||
// used as internal variables, can collide with parameter names
|
// used as internal variables, can collide with parameter names
|
||||||
"path", "queryParams", "headerParams", "formParams", "postBody", "accepts", "accept", "contentTypes",
|
"localVarPath", "localVarQueryParams", "localVarHeaderParams", "localVarFormParams",
|
||||||
"contentType", "authNames",
|
"localVarPostBody", "localVarAccepts", "localVarAccept", "localVarContentTypes",
|
||||||
|
"localVarContentType", "localVarAuthNames", "localReturnType",
|
||||||
|
|
||||||
// language reserved words
|
// language reserved words
|
||||||
"abstract", "continue", "for", "new", "switch", "assert",
|
"abstract", "continue", "for", "new", "switch", "assert",
|
||||||
|
@ -47,7 +47,7 @@ public class {{classname}} {
|
|||||||
* @throws ApiException if fails to make API call
|
* @throws ApiException if fails to make API call
|
||||||
*/
|
*/
|
||||||
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 {
|
||||||
Object {{localVariablePrefix}}postBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}};
|
Object {{localVariablePrefix}}localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}};
|
||||||
{{#allParams}}{{#required}}
|
{{#allParams}}{{#required}}
|
||||||
// verify the required parameter '{{paramName}}' is set
|
// verify the required parameter '{{paramName}}' is set
|
||||||
if ({{paramName}} == null) {
|
if ({{paramName}} == null) {
|
||||||
@ -55,43 +55,43 @@ public class {{classname}} {
|
|||||||
}
|
}
|
||||||
{{/required}}{{/allParams}}
|
{{/required}}{{/allParams}}
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String {{localVariablePrefix}}path = "{{{path}}}".replaceAll("\\{format\\}","json"){{#pathParams}}
|
String {{localVariablePrefix}}localVarPath = "{{{path}}}".replaceAll("\\{format\\}","json"){{#pathParams}}
|
||||||
.replaceAll("\\{" + "{{baseName}}" + "\\}", {{localVariablePrefix}}apiClient.escapeString({{{paramName}}}.toString())){{/pathParams}};
|
.replaceAll("\\{" + "{{baseName}}" + "\\}", {{localVariablePrefix}}apiClient.escapeString({{{paramName}}}.toString())){{/pathParams}};
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
{{javaUtilPrefix}}List<Pair> {{localVariablePrefix}}queryParams = new {{javaUtilPrefix}}ArrayList<Pair>();
|
{{javaUtilPrefix}}List<Pair> {{localVariablePrefix}}localVarQueryParams = new {{javaUtilPrefix}}ArrayList<Pair>();
|
||||||
{{javaUtilPrefix}}Map<String, String> {{localVariablePrefix}}headerParams = new {{javaUtilPrefix}}HashMap<String, String>();
|
{{javaUtilPrefix}}Map<String, String> {{localVariablePrefix}}localVarHeaderParams = new {{javaUtilPrefix}}HashMap<String, String>();
|
||||||
{{javaUtilPrefix}}Map<String, Object> {{localVariablePrefix}}formParams = new {{javaUtilPrefix}}HashMap<String, Object>();
|
{{javaUtilPrefix}}Map<String, Object> {{localVariablePrefix}}localVarFormParams = new {{javaUtilPrefix}}HashMap<String, Object>();
|
||||||
|
|
||||||
{{#queryParams}}
|
{{#queryParams}}
|
||||||
{{localVariablePrefix}}queryParams.addAll({{localVariablePrefix}}apiClient.parameterToPairs("{{#collectionFormat}}{{{collectionFormat}}}{{/collectionFormat}}", "{{baseName}}", {{paramName}}));
|
{{localVariablePrefix}}localVarQueryParams.addAll({{localVariablePrefix}}apiClient.parameterToPairs("{{#collectionFormat}}{{{collectionFormat}}}{{/collectionFormat}}", "{{baseName}}", {{paramName}}));
|
||||||
{{/queryParams}}
|
{{/queryParams}}
|
||||||
|
|
||||||
{{#headerParams}}if ({{paramName}} != null)
|
{{#headerParams}}if ({{paramName}} != null)
|
||||||
{{localVariablePrefix}}headerParams.put("{{baseName}}", {{localVariablePrefix}}apiClient.parameterToString({{paramName}}));
|
{{localVariablePrefix}}localVarHeaderParams.put("{{baseName}}", {{localVariablePrefix}}apiClient.parameterToString({{paramName}}));
|
||||||
{{/headerParams}}
|
{{/headerParams}}
|
||||||
|
|
||||||
{{#formParams}}if ({{paramName}} != null)
|
{{#formParams}}if ({{paramName}} != null)
|
||||||
{{localVariablePrefix}}formParams.put("{{baseName}}", {{paramName}});
|
{{localVariablePrefix}}localVarFormParams.put("{{baseName}}", {{paramName}});
|
||||||
{{/formParams}}
|
{{/formParams}}
|
||||||
|
|
||||||
final String[] {{localVariablePrefix}}accepts = {
|
final String[] {{localVariablePrefix}}localVarAccepts = {
|
||||||
{{#produces}}"{{mediaType}}"{{#hasMore}}, {{/hasMore}}{{/produces}}
|
{{#produces}}"{{mediaType}}"{{#hasMore}}, {{/hasMore}}{{/produces}}
|
||||||
};
|
};
|
||||||
final String {{localVariablePrefix}}accept = {{localVariablePrefix}}apiClient.selectHeaderAccept({{localVariablePrefix}}accepts);
|
final String {{localVariablePrefix}}localVarAccept = {{localVariablePrefix}}apiClient.selectHeaderAccept({{localVariablePrefix}}localVarAccepts);
|
||||||
|
|
||||||
final String[] {{localVariablePrefix}}contentTypes = {
|
final String[] {{localVariablePrefix}}localVarContentTypes = {
|
||||||
{{#consumes}}"{{mediaType}}"{{#hasMore}}, {{/hasMore}}{{/consumes}}
|
{{#consumes}}"{{mediaType}}"{{#hasMore}}, {{/hasMore}}{{/consumes}}
|
||||||
};
|
};
|
||||||
final String {{localVariablePrefix}}contentType = {{localVariablePrefix}}apiClient.selectHeaderContentType({{localVariablePrefix}}contentTypes);
|
final String {{localVariablePrefix}}localVarContentType = {{localVariablePrefix}}apiClient.selectHeaderContentType({{localVariablePrefix}}localVarContentTypes);
|
||||||
|
|
||||||
String[] {{localVariablePrefix}}authNames = new String[] { {{#authMethods}}"{{name}}"{{#hasMore}}, {{/hasMore}}{{/authMethods}} };
|
String[] {{localVariablePrefix}}localVarAuthNames = new String[] { {{#authMethods}}"{{name}}"{{#hasMore}}, {{/hasMore}}{{/authMethods}} };
|
||||||
|
|
||||||
{{#returnType}}
|
{{#returnType}}
|
||||||
GenericType<{{{returnType}}}> {{localVariablePrefix}}returnType = new GenericType<{{{returnType}}}>() {};
|
GenericType<{{{returnType}}}> {{localVariablePrefix}}localVarReturnType = new GenericType<{{{returnType}}}>() {};
|
||||||
return {{localVariablePrefix}}apiClient.invokeAPI({{localVariablePrefix}}path, "{{httpMethod}}", {{localVariablePrefix}}queryParams, {{localVariablePrefix}}postBody, {{localVariablePrefix}}headerParams, {{localVariablePrefix}}formParams, {{localVariablePrefix}}accept, {{localVariablePrefix}}contentType, {{localVariablePrefix}}authNames, {{localVariablePrefix}}returnType);
|
return {{localVariablePrefix}}apiClient.invokeAPI({{localVariablePrefix}}localVarPath, "{{httpMethod}}", {{localVariablePrefix}}localVarQueryParams, {{localVariablePrefix}}localVarPostBody, {{localVariablePrefix}}localVarHeaderParams, {{localVariablePrefix}}localVarFormParams, {{localVariablePrefix}}localVarAccept, {{localVariablePrefix}}localVarContentType, {{localVariablePrefix}}localVarAuthNames, {{localVariablePrefix}}localVarReturnType);
|
||||||
{{/returnType}}{{^returnType}}
|
{{/returnType}}{{^returnType}}
|
||||||
{{localVariablePrefix}}apiClient.invokeAPI({{localVariablePrefix}}path, "{{httpMethod}}", {{localVariablePrefix}}queryParams, {{localVariablePrefix}}postBody, {{localVariablePrefix}}headerParams, {{localVariablePrefix}}formParams, {{localVariablePrefix}}accept, {{localVariablePrefix}}contentType, {{localVariablePrefix}}authNames, null);
|
{{localVariablePrefix}}apiClient.invokeAPI({{localVariablePrefix}}localVarPath, "{{httpMethod}}", {{localVariablePrefix}}localVarQueryParams, {{localVariablePrefix}}localVarPostBody, {{localVariablePrefix}}localVarHeaderParams, {{localVariablePrefix}}localVarFormParams, {{localVariablePrefix}}localVarAccept, {{localVariablePrefix}}localVarContentType, {{localVariablePrefix}}localVarAuthNames, null);
|
||||||
{{/returnType}}
|
{{/returnType}}
|
||||||
}
|
}
|
||||||
{{/operation}}
|
{{/operation}}
|
||||||
|
@ -47,7 +47,7 @@ public class {{classname}} {
|
|||||||
* @throws ApiException if fails to make API call
|
* @throws ApiException if fails to make API call
|
||||||
*/
|
*/
|
||||||
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 {
|
||||||
Object {{localVariablePrefix}}postBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}};
|
Object {{localVariablePrefix}}localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}};
|
||||||
{{#allParams}}{{#required}}
|
{{#allParams}}{{#required}}
|
||||||
// verify the required parameter '{{paramName}}' is set
|
// verify the required parameter '{{paramName}}' is set
|
||||||
if ({{paramName}} == null) {
|
if ({{paramName}} == null) {
|
||||||
@ -55,43 +55,43 @@ public class {{classname}} {
|
|||||||
}
|
}
|
||||||
{{/required}}{{/allParams}}
|
{{/required}}{{/allParams}}
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String {{localVariablePrefix}}path = "{{{path}}}".replaceAll("\\{format\\}","json"){{#pathParams}}
|
String {{localVariablePrefix}}localVarPath = "{{{path}}}".replaceAll("\\{format\\}","json"){{#pathParams}}
|
||||||
.replaceAll("\\{" + "{{baseName}}" + "\\}", {{localVariablePrefix}}apiClient.escapeString({{{paramName}}}.toString())){{/pathParams}};
|
.replaceAll("\\{" + "{{baseName}}" + "\\}", {{localVariablePrefix}}apiClient.escapeString({{{paramName}}}.toString())){{/pathParams}};
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
{{javaUtilPrefix}}List<Pair> {{localVariablePrefix}}queryParams = new {{javaUtilPrefix}}ArrayList<Pair>();
|
{{javaUtilPrefix}}List<Pair> {{localVariablePrefix}}localVarQueryParams = new {{javaUtilPrefix}}ArrayList<Pair>();
|
||||||
{{javaUtilPrefix}}Map<String, String> {{localVariablePrefix}}headerParams = new {{javaUtilPrefix}}HashMap<String, String>();
|
{{javaUtilPrefix}}Map<String, String> {{localVariablePrefix}}localVarHeaderParams = new {{javaUtilPrefix}}HashMap<String, String>();
|
||||||
{{javaUtilPrefix}}Map<String, Object> {{localVariablePrefix}}formParams = new {{javaUtilPrefix}}HashMap<String, Object>();
|
{{javaUtilPrefix}}Map<String, Object> {{localVariablePrefix}}localVarFormParams = new {{javaUtilPrefix}}HashMap<String, Object>();
|
||||||
|
|
||||||
{{#queryParams}}
|
{{#queryParams}}
|
||||||
{{localVariablePrefix}}queryParams.addAll({{localVariablePrefix}}apiClient.parameterToPairs("{{#collectionFormat}}{{{collectionFormat}}}{{/collectionFormat}}", "{{baseName}}", {{paramName}}));
|
{{localVariablePrefix}}localVarQueryParams.addAll({{localVariablePrefix}}apiClient.parameterToPairs("{{#collectionFormat}}{{{collectionFormat}}}{{/collectionFormat}}", "{{baseName}}", {{paramName}}));
|
||||||
{{/queryParams}}
|
{{/queryParams}}
|
||||||
|
|
||||||
{{#headerParams}}if ({{paramName}} != null)
|
{{#headerParams}}if ({{paramName}} != null)
|
||||||
{{localVariablePrefix}}headerParams.put("{{baseName}}", {{localVariablePrefix}}apiClient.parameterToString({{paramName}}));
|
{{localVariablePrefix}}localVarHeaderParams.put("{{baseName}}", {{localVariablePrefix}}apiClient.parameterToString({{paramName}}));
|
||||||
{{/headerParams}}
|
{{/headerParams}}
|
||||||
|
|
||||||
{{#formParams}}if ({{paramName}} != null)
|
{{#formParams}}if ({{paramName}} != null)
|
||||||
{{localVariablePrefix}}formParams.put("{{baseName}}", {{paramName}});
|
{{localVariablePrefix}}localVarFormParams.put("{{baseName}}", {{paramName}});
|
||||||
{{/formParams}}
|
{{/formParams}}
|
||||||
|
|
||||||
final String[] {{localVariablePrefix}}accepts = {
|
final String[] {{localVariablePrefix}}localVarAccepts = {
|
||||||
{{#produces}}"{{mediaType}}"{{#hasMore}}, {{/hasMore}}{{/produces}}
|
{{#produces}}"{{mediaType}}"{{#hasMore}}, {{/hasMore}}{{/produces}}
|
||||||
};
|
};
|
||||||
final String {{localVariablePrefix}}accept = {{localVariablePrefix}}apiClient.selectHeaderAccept({{localVariablePrefix}}accepts);
|
final String {{localVariablePrefix}}localVarAccept = {{localVariablePrefix}}apiClient.selectHeaderAccept({{localVariablePrefix}}localVarAccepts);
|
||||||
|
|
||||||
final String[] {{localVariablePrefix}}contentTypes = {
|
final String[] {{localVariablePrefix}}localVarContentTypes = {
|
||||||
{{#consumes}}"{{mediaType}}"{{#hasMore}}, {{/hasMore}}{{/consumes}}
|
{{#consumes}}"{{mediaType}}"{{#hasMore}}, {{/hasMore}}{{/consumes}}
|
||||||
};
|
};
|
||||||
final String {{localVariablePrefix}}contentType = {{localVariablePrefix}}apiClient.selectHeaderContentType({{localVariablePrefix}}contentTypes);
|
final String {{localVariablePrefix}}localVarContentType = {{localVariablePrefix}}apiClient.selectHeaderContentType({{localVariablePrefix}}localVarContentTypes);
|
||||||
|
|
||||||
String[] {{localVariablePrefix}}authNames = new String[] { {{#authMethods}}"{{name}}"{{#hasMore}}, {{/hasMore}}{{/authMethods}} };
|
String[] {{localVariablePrefix}}localVarAuthNames = new String[] { {{#authMethods}}"{{name}}"{{#hasMore}}, {{/hasMore}}{{/authMethods}} };
|
||||||
|
|
||||||
{{#returnType}}
|
{{#returnType}}
|
||||||
GenericType<{{{returnType}}}> {{localVariablePrefix}}returnType = new GenericType<{{{returnType}}}>() {};
|
GenericType<{{{returnType}}}> {{localVariablePrefix}}localVarReturnType = new GenericType<{{{returnType}}}>() {};
|
||||||
return {{localVariablePrefix}}apiClient.invokeAPI({{localVariablePrefix}}path, "{{httpMethod}}", {{localVariablePrefix}}queryParams, {{localVariablePrefix}}postBody, {{localVariablePrefix}}headerParams, {{localVariablePrefix}}formParams, {{localVariablePrefix}}accept, {{localVariablePrefix}}contentType, {{localVariablePrefix}}authNames, {{localVariablePrefix}}returnType);
|
return {{localVariablePrefix}}apiClient.invokeAPI({{localVariablePrefix}}localVarPath, "{{httpMethod}}", {{localVariablePrefix}}localVarQueryParams, {{localVariablePrefix}}localVarPostBody, {{localVariablePrefix}}localVarHeaderParams, {{localVariablePrefix}}localVarFormParams, {{localVariablePrefix}}localVarAccept, {{localVariablePrefix}}localVarContentType, {{localVariablePrefix}}localVarAuthNames, {{localVariablePrefix}}localVarReturnType);
|
||||||
{{/returnType}}{{^returnType}}
|
{{/returnType}}{{^returnType}}
|
||||||
{{localVariablePrefix}}apiClient.invokeAPI({{localVariablePrefix}}path, "{{httpMethod}}", {{localVariablePrefix}}queryParams, {{localVariablePrefix}}postBody, {{localVariablePrefix}}headerParams, {{localVariablePrefix}}formParams, {{localVariablePrefix}}accept, {{localVariablePrefix}}contentType, {{localVariablePrefix}}authNames, null);
|
{{localVariablePrefix}}apiClient.invokeAPI({{localVariablePrefix}}localVarPath, "{{httpMethod}}", {{localVariablePrefix}}localVarQueryParams, {{localVariablePrefix}}localVarPostBody, {{localVariablePrefix}}localVarHeaderParams, {{localVariablePrefix}}localVarFormParams, {{localVariablePrefix}}localVarAccept, {{localVariablePrefix}}localVarContentType, {{localVariablePrefix}}localVarAuthNames, null);
|
||||||
{{/returnType}}
|
{{/returnType}}
|
||||||
}
|
}
|
||||||
{{/operation}}
|
{{/operation}}
|
||||||
|
@ -51,7 +51,7 @@ public class {{classname}} {
|
|||||||
{{#operation}}
|
{{#operation}}
|
||||||
/* Build call for {{operationId}} */
|
/* Build call for {{operationId}} */
|
||||||
private Call {{operationId}}Call({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
private Call {{operationId}}Call({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||||
Object {{localVariablePrefix}}postBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}};
|
Object {{localVariablePrefix}}localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}};
|
||||||
{{#allParams}}{{#required}}
|
{{#allParams}}{{#required}}
|
||||||
// verify the required parameter '{{paramName}}' is set
|
// verify the required parameter '{{paramName}}' is set
|
||||||
if ({{paramName}} == null) {
|
if ({{paramName}} == null) {
|
||||||
@ -60,32 +60,32 @@ public class {{classname}} {
|
|||||||
{{/required}}{{/allParams}}
|
{{/required}}{{/allParams}}
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String {{localVariablePrefix}}path = "{{path}}".replaceAll("\\{format\\}","json"){{#pathParams}}
|
String {{localVariablePrefix}}localVarPath = "{{path}}".replaceAll("\\{format\\}","json"){{#pathParams}}
|
||||||
.replaceAll("\\{" + "{{baseName}}" + "\\}", {{localVariablePrefix}}apiClient.escapeString({{{paramName}}}.toString())){{/pathParams}};
|
.replaceAll("\\{" + "{{baseName}}" + "\\}", {{localVariablePrefix}}apiClient.escapeString({{{paramName}}}.toString())){{/pathParams}};
|
||||||
|
|
||||||
{{javaUtilPrefix}}List<Pair> {{localVariablePrefix}}queryParams = new {{javaUtilPrefix}}ArrayList<Pair>();{{#queryParams}}
|
{{javaUtilPrefix}}List<Pair> {{localVariablePrefix}}localVarQueryParams = new {{javaUtilPrefix}}ArrayList<Pair>();{{#queryParams}}
|
||||||
if ({{paramName}} != null)
|
if ({{paramName}} != null)
|
||||||
{{localVariablePrefix}}queryParams.addAll({{localVariablePrefix}}apiClient.parameterToPairs("{{#collectionFormat}}{{{collectionFormat}}}{{/collectionFormat}}", "{{baseName}}", {{paramName}}));{{/queryParams}}
|
{{localVariablePrefix}}localVarQueryParams.addAll({{localVariablePrefix}}apiClient.parameterToPairs("{{#collectionFormat}}{{{collectionFormat}}}{{/collectionFormat}}", "{{baseName}}", {{paramName}}));{{/queryParams}}
|
||||||
|
|
||||||
{{javaUtilPrefix}}Map<String, String> {{localVariablePrefix}}headerParams = new {{javaUtilPrefix}}HashMap<String, String>();{{#headerParams}}
|
{{javaUtilPrefix}}Map<String, String> {{localVariablePrefix}}localVarHeaderParams = new {{javaUtilPrefix}}HashMap<String, String>();{{#headerParams}}
|
||||||
if ({{paramName}} != null)
|
if ({{paramName}} != null)
|
||||||
{{localVariablePrefix}}headerParams.put("{{baseName}}", {{localVariablePrefix}}apiClient.parameterToString({{paramName}}));{{/headerParams}}
|
{{localVariablePrefix}}localVarHeaderParams.put("{{baseName}}", {{localVariablePrefix}}apiClient.parameterToString({{paramName}}));{{/headerParams}}
|
||||||
|
|
||||||
{{javaUtilPrefix}}Map<String, Object> {{localVariablePrefix}}formParams = new {{javaUtilPrefix}}HashMap<String, Object>();{{#formParams}}
|
{{javaUtilPrefix}}Map<String, Object> {{localVariablePrefix}}localVarFormParams = new {{javaUtilPrefix}}HashMap<String, Object>();{{#formParams}}
|
||||||
if ({{paramName}} != null)
|
if ({{paramName}} != null)
|
||||||
{{localVariablePrefix}}formParams.put("{{baseName}}", {{paramName}});{{/formParams}}
|
{{localVariablePrefix}}localVarFormParams.put("{{baseName}}", {{paramName}});{{/formParams}}
|
||||||
|
|
||||||
final String[] {{localVariablePrefix}}accepts = {
|
final String[] {{localVariablePrefix}}localVarAccepts = {
|
||||||
{{#produces}}"{{mediaType}}"{{#hasMore}}, {{/hasMore}}{{/produces}}
|
{{#produces}}"{{mediaType}}"{{#hasMore}}, {{/hasMore}}{{/produces}}
|
||||||
};
|
};
|
||||||
final String {{localVariablePrefix}}accept = {{localVariablePrefix}}apiClient.selectHeaderAccept({{localVariablePrefix}}accepts);
|
final String {{localVariablePrefix}}localVarAccept = {{localVariablePrefix}}apiClient.selectHeaderAccept({{localVariablePrefix}}localVarAccepts);
|
||||||
if ({{localVariablePrefix}}accept != null) {{localVariablePrefix}}headerParams.put("Accept", {{localVariablePrefix}}accept);
|
if ({{localVariablePrefix}}localVarAccept != null) {{localVariablePrefix}}localVarHeaderParams.put("Accept", {{localVariablePrefix}}localVarAccept);
|
||||||
|
|
||||||
final String[] {{localVariablePrefix}}contentTypes = {
|
final String[] {{localVariablePrefix}}localVarContentTypes = {
|
||||||
{{#consumes}}"{{mediaType}}"{{#hasMore}}, {{/hasMore}}{{/consumes}}
|
{{#consumes}}"{{mediaType}}"{{#hasMore}}, {{/hasMore}}{{/consumes}}
|
||||||
};
|
};
|
||||||
final String {{localVariablePrefix}}contentType = {{localVariablePrefix}}apiClient.selectHeaderContentType({{localVariablePrefix}}contentTypes);
|
final String {{localVariablePrefix}}localVarContentType = {{localVariablePrefix}}apiClient.selectHeaderContentType({{localVariablePrefix}}localVarContentTypes);
|
||||||
{{localVariablePrefix}}headerParams.put("Content-Type", {{localVariablePrefix}}contentType);
|
{{localVariablePrefix}}localVarHeaderParams.put("Content-Type", {{localVariablePrefix}}localVarContentType);
|
||||||
|
|
||||||
if(progressListener != null) {
|
if(progressListener != null) {
|
||||||
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
||||||
@ -99,8 +99,8 @@ public class {{classname}} {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] {{localVariablePrefix}}authNames = new String[] { {{#authMethods}}"{{name}}"{{#hasMore}}, {{/hasMore}}{{/authMethods}} };
|
String[] {{localVariablePrefix}}localVarAuthNames = new String[] { {{#authMethods}}"{{name}}"{{#hasMore}}, {{/hasMore}}{{/authMethods}} };
|
||||||
return {{localVariablePrefix}}apiClient.buildCall({{localVariablePrefix}}path, "{{httpMethod}}", {{localVariablePrefix}}queryParams, {{localVariablePrefix}}postBody, {{localVariablePrefix}}headerParams, {{localVariablePrefix}}formParams, {{localVariablePrefix}}authNames, progressRequestListener);
|
return {{localVariablePrefix}}apiClient.buildCall({{localVariablePrefix}}localVarPath, "{{httpMethod}}", {{localVariablePrefix}}localVarQueryParams, {{localVariablePrefix}}localVarPostBody, {{localVariablePrefix}}localVarHeaderParams, {{localVariablePrefix}}localVarFormParams, {{localVariablePrefix}}localVarAuthNames, progressRequestListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -124,8 +124,8 @@ public class {{classname}} {
|
|||||||
*/
|
*/
|
||||||
public ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException {
|
public ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException {
|
||||||
Call {{localVariablePrefix}}call = {{operationId}}Call({{#allParams}}{{paramName}}, {{/allParams}}null, null);
|
Call {{localVariablePrefix}}call = {{operationId}}Call({{#allParams}}{{paramName}}, {{/allParams}}null, null);
|
||||||
{{#returnType}}Type {{localVariablePrefix}}returnType = new TypeToken<{{{returnType}}}>(){}.getType();
|
{{#returnType}}Type {{localVariablePrefix}}localVarReturnType = new TypeToken<{{{returnType}}}>(){}.getType();
|
||||||
return {{localVariablePrefix}}apiClient.execute({{localVariablePrefix}}call, {{localVariablePrefix}}returnType);{{/returnType}}{{^returnType}}return {{localVariablePrefix}}apiClient.execute({{localVariablePrefix}}call);{{/returnType}}
|
return {{localVariablePrefix}}apiClient.execute({{localVariablePrefix}}call, {{localVariablePrefix}}localVarReturnType);{{/returnType}}{{^returnType}}return {{localVariablePrefix}}apiClient.execute({{localVariablePrefix}}call);{{/returnType}}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -146,7 +146,7 @@ public class {{classname}} {
|
|||||||
@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() {
|
||||||
@ -158,8 +158,8 @@ public class {{classname}} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Call {{localVariablePrefix}}call = {{operationId}}Call({{#allParams}}{{paramName}}, {{/allParams}}progressListener, progressRequestListener);
|
Call {{localVariablePrefix}}call = {{operationId}}Call({{#allParams}}{{paramName}}, {{/allParams}}progressListener, progressRequestListener);
|
||||||
{{#returnType}}Type {{localVariablePrefix}}returnType = new TypeToken<{{{returnType}}}>(){}.getType();
|
{{#returnType}}Type {{localVariablePrefix}}localVarReturnType = new TypeToken<{{{returnType}}}>(){}.getType();
|
||||||
{{localVariablePrefix}}apiClient.executeAsync({{localVariablePrefix}}call, {{localVariablePrefix}}returnType, {{localVariablePrefix}}callback);{{/returnType}}{{^returnType}}{{localVariablePrefix}}apiClient.executeAsync({{localVariablePrefix}}call, {{localVariablePrefix}}callback);{{/returnType}}
|
{{localVariablePrefix}}apiClient.executeAsync({{localVariablePrefix}}call, {{localVariablePrefix}}localVarReturnType, {{localVariablePrefix}}callback);{{/returnType}}{{^returnType}}{{localVariablePrefix}}apiClient.executeAsync({{localVariablePrefix}}call, {{localVariablePrefix}}callback);{{/returnType}}
|
||||||
return {{localVariablePrefix}}call;
|
return {{localVariablePrefix}}call;
|
||||||
}
|
}
|
||||||
{{/operation}}
|
{{/operation}}
|
||||||
|
@ -15,7 +15,7 @@ import java.util.HashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-25T16:09:10.101+08:00")
|
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-29T12:55:35.772+08:00")
|
||||||
public class PetApi {
|
public class PetApi {
|
||||||
private ApiClient apiClient;
|
private ApiClient apiClient;
|
||||||
|
|
||||||
@ -43,15 +43,15 @@ public class PetApi {
|
|||||||
* @throws ApiException if fails to make API call
|
* @throws ApiException if fails to make API call
|
||||||
*/
|
*/
|
||||||
public void updatePet(Pet body) throws ApiException {
|
public void updatePet(Pet body) throws ApiException {
|
||||||
Object postBody = body;
|
Object localVarPostBody = body;
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/pet".replaceAll("\\{format\\}","json");
|
String localVarPath = "/pet".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -59,20 +59,20 @@ public class PetApi {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth" };
|
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||||
|
|
||||||
|
|
||||||
apiClient.invokeAPI(path, "PUT", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, null);
|
apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,15 +83,15 @@ public class PetApi {
|
|||||||
* @throws ApiException if fails to make API call
|
* @throws ApiException if fails to make API call
|
||||||
*/
|
*/
|
||||||
public void addPet(Pet body) throws ApiException {
|
public void addPet(Pet body) throws ApiException {
|
||||||
Object postBody = body;
|
Object localVarPostBody = body;
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/pet".replaceAll("\\{format\\}","json");
|
String localVarPath = "/pet".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -99,64 +99,64 @@ public class PetApi {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth" };
|
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||||
|
|
||||||
|
|
||||||
apiClient.invokeAPI(path, "POST", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, null);
|
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Finds Pets by status
|
* Finds Pets by status
|
||||||
* Multiple status values can be provided with comma seperated strings
|
* Multiple status values can be provided with comma separated strings
|
||||||
* @param status Status values that need to be considered for filter
|
* @param status Status values that need to be considered for query
|
||||||
* @return List<Pet>
|
* @return List<Pet>
|
||||||
* @throws ApiException if fails to make API call
|
* @throws ApiException if fails to make API call
|
||||||
*/
|
*/
|
||||||
public List<Pet> findPetsByStatus(List<String> status) throws ApiException {
|
public List<Pet> findPetsByStatus(List<String> status) throws ApiException {
|
||||||
Object postBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/pet/findByStatus".replaceAll("\\{format\\}","json");
|
String localVarPath = "/pet/findByStatus".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
queryParams.addAll(apiClient.parameterToPairs("multi", "status", status));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "status", status));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth" };
|
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||||
|
|
||||||
|
|
||||||
GenericType<List<Pet>> returnType = new GenericType<List<Pet>>() {};
|
GenericType<List<Pet>> localVarReturnType = new GenericType<List<Pet>>() {};
|
||||||
return apiClient.invokeAPI(path, "GET", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
|
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -168,39 +168,39 @@ public class PetApi {
|
|||||||
* @throws ApiException if fails to make API call
|
* @throws ApiException if fails to make API call
|
||||||
*/
|
*/
|
||||||
public List<Pet> findPetsByTags(List<String> tags) throws ApiException {
|
public List<Pet> findPetsByTags(List<String> tags) throws ApiException {
|
||||||
Object postBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/pet/findByTags".replaceAll("\\{format\\}","json");
|
String localVarPath = "/pet/findByTags".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
queryParams.addAll(apiClient.parameterToPairs("multi", "tags", tags));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "tags", tags));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth" };
|
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||||
|
|
||||||
|
|
||||||
GenericType<List<Pet>> returnType = new GenericType<List<Pet>>() {};
|
GenericType<List<Pet>> localVarReturnType = new GenericType<List<Pet>>() {};
|
||||||
return apiClient.invokeAPI(path, "GET", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
|
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -212,7 +212,7 @@ public class PetApi {
|
|||||||
* @throws ApiException if fails to make API call
|
* @throws ApiException if fails to make API call
|
||||||
*/
|
*/
|
||||||
public Pet getPetById(Long petId) throws ApiException {
|
public Pet getPetById(Long petId) throws ApiException {
|
||||||
Object postBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
// verify the required parameter 'petId' is set
|
||||||
if (petId == null) {
|
if (petId == null) {
|
||||||
@ -220,13 +220,13 @@ public class PetApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/pet/{petId}".replaceAll("\\{format\\}","json")
|
String localVarPath = "/pet/{petId}".replaceAll("\\{format\\}","json")
|
||||||
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -234,21 +234,21 @@ public class PetApi {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth", "api_key" };
|
String[] localVarAuthNames = new String[] { "petstore_auth", "api_key" };
|
||||||
|
|
||||||
|
|
||||||
GenericType<Pet> returnType = new GenericType<Pet>() {};
|
GenericType<Pet> localVarReturnType = new GenericType<Pet>() {};
|
||||||
return apiClient.invokeAPI(path, "GET", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
|
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -261,7 +261,7 @@ public class PetApi {
|
|||||||
* @throws ApiException if fails to make API call
|
* @throws ApiException if fails to make API call
|
||||||
*/
|
*/
|
||||||
public void updatePetWithForm(String petId, String name, String status) throws ApiException {
|
public void updatePetWithForm(String petId, String name, String status) throws ApiException {
|
||||||
Object postBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
// verify the required parameter 'petId' is set
|
||||||
if (petId == null) {
|
if (petId == null) {
|
||||||
@ -269,38 +269,38 @@ public class PetApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/pet/{petId}".replaceAll("\\{format\\}","json")
|
String localVarPath = "/pet/{petId}".replaceAll("\\{format\\}","json")
|
||||||
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (name != null)
|
if (name != null)
|
||||||
formParams.put("name", name);
|
localVarFormParams.put("name", name);
|
||||||
if (status != null)
|
if (status != null)
|
||||||
formParams.put("status", status);
|
localVarFormParams.put("status", status);
|
||||||
|
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
"application/x-www-form-urlencoded"
|
"application/x-www-form-urlencoded"
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth" };
|
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||||
|
|
||||||
|
|
||||||
apiClient.invokeAPI(path, "POST", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, null);
|
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -312,7 +312,7 @@ public class PetApi {
|
|||||||
* @throws ApiException if fails to make API call
|
* @throws ApiException if fails to make API call
|
||||||
*/
|
*/
|
||||||
public void deletePet(Long petId, String apiKey) throws ApiException {
|
public void deletePet(Long petId, String apiKey) throws ApiException {
|
||||||
Object postBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
// verify the required parameter 'petId' is set
|
||||||
if (petId == null) {
|
if (petId == null) {
|
||||||
@ -320,36 +320,36 @@ public class PetApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/pet/{petId}".replaceAll("\\{format\\}","json")
|
String localVarPath = "/pet/{petId}".replaceAll("\\{format\\}","json")
|
||||||
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (apiKey != null)
|
if (apiKey != null)
|
||||||
headerParams.put("api_key", apiClient.parameterToString(apiKey));
|
localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth" };
|
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||||
|
|
||||||
|
|
||||||
apiClient.invokeAPI(path, "DELETE", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, null);
|
apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -362,7 +362,7 @@ public class PetApi {
|
|||||||
* @throws ApiException if fails to make API call
|
* @throws ApiException if fails to make API call
|
||||||
*/
|
*/
|
||||||
public void uploadFile(Long petId, String additionalMetadata, File file) throws ApiException {
|
public void uploadFile(Long petId, String additionalMetadata, File file) throws ApiException {
|
||||||
Object postBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
// verify the required parameter 'petId' is set
|
||||||
if (petId == null) {
|
if (petId == null) {
|
||||||
@ -370,38 +370,38 @@ public class PetApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/pet/{petId}/uploadImage".replaceAll("\\{format\\}","json")
|
String localVarPath = "/pet/{petId}/uploadImage".replaceAll("\\{format\\}","json")
|
||||||
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (additionalMetadata != null)
|
if (additionalMetadata != null)
|
||||||
formParams.put("additionalMetadata", additionalMetadata);
|
localVarFormParams.put("additionalMetadata", additionalMetadata);
|
||||||
if (file != null)
|
if (file != null)
|
||||||
formParams.put("file", file);
|
localVarFormParams.put("file", file);
|
||||||
|
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
"multipart/form-data"
|
"multipart/form-data"
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth" };
|
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||||
|
|
||||||
|
|
||||||
apiClient.invokeAPI(path, "POST", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, null);
|
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -413,7 +413,7 @@ public class PetApi {
|
|||||||
* @throws ApiException if fails to make API call
|
* @throws ApiException if fails to make API call
|
||||||
*/
|
*/
|
||||||
public byte[] petPetIdtestingByteArraytrueGet(Long petId) throws ApiException {
|
public byte[] petPetIdtestingByteArraytrueGet(Long petId) throws ApiException {
|
||||||
Object postBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
// verify the required parameter 'petId' is set
|
||||||
if (petId == null) {
|
if (petId == null) {
|
||||||
@ -421,13 +421,13 @@ public class PetApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/pet/{petId}?testing_byte_array=true".replaceAll("\\{format\\}","json")
|
String localVarPath = "/pet/{petId}?testing_byte_array=true".replaceAll("\\{format\\}","json")
|
||||||
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -435,21 +435,21 @@ public class PetApi {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth", "api_key" };
|
String[] localVarAuthNames = new String[] { "petstore_auth", "api_key" };
|
||||||
|
|
||||||
|
|
||||||
GenericType<byte[]> returnType = new GenericType<byte[]>() {};
|
GenericType<byte[]> localVarReturnType = new GenericType<byte[]>() {};
|
||||||
return apiClient.invokeAPI(path, "GET", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
|
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -460,15 +460,15 @@ public class PetApi {
|
|||||||
* @throws ApiException if fails to make API call
|
* @throws ApiException if fails to make API call
|
||||||
*/
|
*/
|
||||||
public void addPetUsingByteArray(byte[] body) throws ApiException {
|
public void addPetUsingByteArray(byte[] body) throws ApiException {
|
||||||
Object postBody = body;
|
Object localVarPostBody = body;
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/pet?testing_byte_array=true".replaceAll("\\{format\\}","json");
|
String localVarPath = "/pet?testing_byte_array=true".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -476,20 +476,20 @@ public class PetApi {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth" };
|
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||||
|
|
||||||
|
|
||||||
apiClient.invokeAPI(path, "POST", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, null);
|
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ import java.util.HashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-23T20:01:57.005+08:00")
|
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-29T12:55:35.772+08:00")
|
||||||
public class StoreApi {
|
public class StoreApi {
|
||||||
private ApiClient apiClient;
|
private ApiClient apiClient;
|
||||||
|
|
||||||
@ -35,6 +35,50 @@ public class StoreApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finds orders by status
|
||||||
|
* A single status value can be provided as a string
|
||||||
|
* @param status Status value that needs to be considered for query
|
||||||
|
* @return List<Order>
|
||||||
|
* @throws ApiException if fails to make API call
|
||||||
|
*/
|
||||||
|
public List<Order> findOrdersByStatus(String status) throws ApiException {
|
||||||
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
|
// create path and map variables
|
||||||
|
String localVarPath = "/store/findByStatus".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
|
// query params
|
||||||
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
|
localVarQueryParams.addAll(apiClient.parameterToPairs("", "status", status));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
final String[] localVarAccepts = {
|
||||||
|
"application/json", "application/xml"
|
||||||
|
};
|
||||||
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
|
};
|
||||||
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
|
String[] localVarAuthNames = new String[] { "test_api_client_id", "test_api_client_secret" };
|
||||||
|
|
||||||
|
|
||||||
|
GenericType<List<Order>> localVarReturnType = new GenericType<List<Order>>() {};
|
||||||
|
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns pet inventories by status
|
* Returns pet inventories by status
|
||||||
* Returns a map of status codes to quantities
|
* Returns a map of status codes to quantities
|
||||||
@ -42,15 +86,15 @@ public class StoreApi {
|
|||||||
* @throws ApiException if fails to make API call
|
* @throws ApiException if fails to make API call
|
||||||
*/
|
*/
|
||||||
public Map<String, Integer> getInventory() throws ApiException {
|
public Map<String, Integer> getInventory() throws ApiException {
|
||||||
Object postBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/store/inventory".replaceAll("\\{format\\}","json");
|
String localVarPath = "/store/inventory".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -58,21 +102,21 @@ public class StoreApi {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
String[] authNames = new String[] { "api_key" };
|
String[] localVarAuthNames = new String[] { "api_key" };
|
||||||
|
|
||||||
|
|
||||||
GenericType<Map<String, Integer>> returnType = new GenericType<Map<String, Integer>>() {};
|
GenericType<Map<String, Integer>> localVarReturnType = new GenericType<Map<String, Integer>>() {};
|
||||||
return apiClient.invokeAPI(path, "GET", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
|
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,15 +128,15 @@ public class StoreApi {
|
|||||||
* @throws ApiException if fails to make API call
|
* @throws ApiException if fails to make API call
|
||||||
*/
|
*/
|
||||||
public Order placeOrder(Order body) throws ApiException {
|
public Order placeOrder(Order body) throws ApiException {
|
||||||
Object postBody = body;
|
Object localVarPostBody = body;
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/store/order".replaceAll("\\{format\\}","json");
|
String localVarPath = "/store/order".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -100,21 +144,21 @@ public class StoreApi {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
String[] authNames = new String[] { "test_api_client_id", "test_api_client_secret" };
|
String[] localVarAuthNames = new String[] { "test_api_client_id", "test_api_client_secret" };
|
||||||
|
|
||||||
|
|
||||||
GenericType<Order> returnType = new GenericType<Order>() {};
|
GenericType<Order> localVarReturnType = new GenericType<Order>() {};
|
||||||
return apiClient.invokeAPI(path, "POST", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
|
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -126,7 +170,7 @@ public class StoreApi {
|
|||||||
* @throws ApiException if fails to make API call
|
* @throws ApiException if fails to make API call
|
||||||
*/
|
*/
|
||||||
public Order getOrderById(String orderId) throws ApiException {
|
public Order getOrderById(String orderId) throws ApiException {
|
||||||
Object postBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
// verify the required parameter 'orderId' is set
|
// verify the required parameter 'orderId' is set
|
||||||
if (orderId == null) {
|
if (orderId == null) {
|
||||||
@ -134,13 +178,13 @@ public class StoreApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/store/order/{orderId}".replaceAll("\\{format\\}","json")
|
String localVarPath = "/store/order/{orderId}".replaceAll("\\{format\\}","json")
|
||||||
.replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString()));
|
.replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString()));
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -148,21 +192,21 @@ public class StoreApi {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
String[] authNames = new String[] { "test_api_key_query", "test_api_key_header" };
|
String[] localVarAuthNames = new String[] { "test_api_key_query", "test_api_key_header" };
|
||||||
|
|
||||||
|
|
||||||
GenericType<Order> returnType = new GenericType<Order>() {};
|
GenericType<Order> localVarReturnType = new GenericType<Order>() {};
|
||||||
return apiClient.invokeAPI(path, "GET", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
|
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -173,7 +217,7 @@ public class StoreApi {
|
|||||||
* @throws ApiException if fails to make API call
|
* @throws ApiException if fails to make API call
|
||||||
*/
|
*/
|
||||||
public void deleteOrder(String orderId) throws ApiException {
|
public void deleteOrder(String orderId) throws ApiException {
|
||||||
Object postBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
// verify the required parameter 'orderId' is set
|
// verify the required parameter 'orderId' is set
|
||||||
if (orderId == null) {
|
if (orderId == null) {
|
||||||
@ -181,13 +225,13 @@ public class StoreApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/store/order/{orderId}".replaceAll("\\{format\\}","json")
|
String localVarPath = "/store/order/{orderId}".replaceAll("\\{format\\}","json")
|
||||||
.replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString()));
|
.replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString()));
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -195,20 +239,20 @@ public class StoreApi {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] localVarAuthNames = new String[] { };
|
||||||
|
|
||||||
|
|
||||||
apiClient.invokeAPI(path, "DELETE", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, null);
|
apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ import java.util.HashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-23T20:01:57.005+08:00")
|
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-29T12:55:35.772+08:00")
|
||||||
public class UserApi {
|
public class UserApi {
|
||||||
private ApiClient apiClient;
|
private ApiClient apiClient;
|
||||||
|
|
||||||
@ -42,15 +42,15 @@ public class UserApi {
|
|||||||
* @throws ApiException if fails to make API call
|
* @throws ApiException if fails to make API call
|
||||||
*/
|
*/
|
||||||
public void createUser(User body) throws ApiException {
|
public void createUser(User body) throws ApiException {
|
||||||
Object postBody = body;
|
Object localVarPostBody = body;
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/user".replaceAll("\\{format\\}","json");
|
String localVarPath = "/user".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -58,20 +58,20 @@ public class UserApi {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] localVarAuthNames = new String[] { };
|
||||||
|
|
||||||
|
|
||||||
apiClient.invokeAPI(path, "POST", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, null);
|
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -82,15 +82,15 @@ public class UserApi {
|
|||||||
* @throws ApiException if fails to make API call
|
* @throws ApiException if fails to make API call
|
||||||
*/
|
*/
|
||||||
public void createUsersWithArrayInput(List<User> body) throws ApiException {
|
public void createUsersWithArrayInput(List<User> body) throws ApiException {
|
||||||
Object postBody = body;
|
Object localVarPostBody = body;
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/user/createWithArray".replaceAll("\\{format\\}","json");
|
String localVarPath = "/user/createWithArray".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -98,20 +98,20 @@ public class UserApi {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] localVarAuthNames = new String[] { };
|
||||||
|
|
||||||
|
|
||||||
apiClient.invokeAPI(path, "POST", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, null);
|
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -122,15 +122,15 @@ public class UserApi {
|
|||||||
* @throws ApiException if fails to make API call
|
* @throws ApiException if fails to make API call
|
||||||
*/
|
*/
|
||||||
public void createUsersWithListInput(List<User> body) throws ApiException {
|
public void createUsersWithListInput(List<User> body) throws ApiException {
|
||||||
Object postBody = body;
|
Object localVarPostBody = body;
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/user/createWithList".replaceAll("\\{format\\}","json");
|
String localVarPath = "/user/createWithList".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -138,20 +138,20 @@ public class UserApi {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] localVarAuthNames = new String[] { };
|
||||||
|
|
||||||
|
|
||||||
apiClient.invokeAPI(path, "POST", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, null);
|
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -164,41 +164,41 @@ public class UserApi {
|
|||||||
* @throws ApiException if fails to make API call
|
* @throws ApiException if fails to make API call
|
||||||
*/
|
*/
|
||||||
public String loginUser(String username, String password) throws ApiException {
|
public String loginUser(String username, String password) throws ApiException {
|
||||||
Object postBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/user/login".replaceAll("\\{format\\}","json");
|
String localVarPath = "/user/login".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
queryParams.addAll(apiClient.parameterToPairs("", "username", username));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("", "username", username));
|
||||||
|
|
||||||
queryParams.addAll(apiClient.parameterToPairs("", "password", password));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("", "password", password));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] localVarAuthNames = new String[] { };
|
||||||
|
|
||||||
|
|
||||||
GenericType<String> returnType = new GenericType<String>() {};
|
GenericType<String> localVarReturnType = new GenericType<String>() {};
|
||||||
return apiClient.invokeAPI(path, "GET", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
|
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -208,15 +208,15 @@ public class UserApi {
|
|||||||
* @throws ApiException if fails to make API call
|
* @throws ApiException if fails to make API call
|
||||||
*/
|
*/
|
||||||
public void logoutUser() throws ApiException {
|
public void logoutUser() throws ApiException {
|
||||||
Object postBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/user/logout".replaceAll("\\{format\\}","json");
|
String localVarPath = "/user/logout".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -224,20 +224,20 @@ public class UserApi {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] localVarAuthNames = new String[] { };
|
||||||
|
|
||||||
|
|
||||||
apiClient.invokeAPI(path, "GET", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, null);
|
apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -249,7 +249,7 @@ public class UserApi {
|
|||||||
* @throws ApiException if fails to make API call
|
* @throws ApiException if fails to make API call
|
||||||
*/
|
*/
|
||||||
public User getUserByName(String username) throws ApiException {
|
public User getUserByName(String username) throws ApiException {
|
||||||
Object postBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
// verify the required parameter 'username' is set
|
// verify the required parameter 'username' is set
|
||||||
if (username == null) {
|
if (username == null) {
|
||||||
@ -257,13 +257,13 @@ public class UserApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/user/{username}".replaceAll("\\{format\\}","json")
|
String localVarPath = "/user/{username}".replaceAll("\\{format\\}","json")
|
||||||
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
|
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -271,21 +271,21 @@ public class UserApi {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] localVarAuthNames = new String[] { };
|
||||||
|
|
||||||
|
|
||||||
GenericType<User> returnType = new GenericType<User>() {};
|
GenericType<User> localVarReturnType = new GenericType<User>() {};
|
||||||
return apiClient.invokeAPI(path, "GET", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
|
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -297,7 +297,7 @@ public class UserApi {
|
|||||||
* @throws ApiException if fails to make API call
|
* @throws ApiException if fails to make API call
|
||||||
*/
|
*/
|
||||||
public void updateUser(String username, User body) throws ApiException {
|
public void updateUser(String username, User body) throws ApiException {
|
||||||
Object postBody = body;
|
Object localVarPostBody = body;
|
||||||
|
|
||||||
// verify the required parameter 'username' is set
|
// verify the required parameter 'username' is set
|
||||||
if (username == null) {
|
if (username == null) {
|
||||||
@ -305,13 +305,13 @@ public class UserApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/user/{username}".replaceAll("\\{format\\}","json")
|
String localVarPath = "/user/{username}".replaceAll("\\{format\\}","json")
|
||||||
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
|
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -319,20 +319,20 @@ public class UserApi {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] localVarAuthNames = new String[] { };
|
||||||
|
|
||||||
|
|
||||||
apiClient.invokeAPI(path, "PUT", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, null);
|
apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -343,7 +343,7 @@ public class UserApi {
|
|||||||
* @throws ApiException if fails to make API call
|
* @throws ApiException if fails to make API call
|
||||||
*/
|
*/
|
||||||
public void deleteUser(String username) throws ApiException {
|
public void deleteUser(String username) throws ApiException {
|
||||||
Object postBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
// verify the required parameter 'username' is set
|
// verify the required parameter 'username' is set
|
||||||
if (username == null) {
|
if (username == null) {
|
||||||
@ -351,13 +351,13 @@ public class UserApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/user/{username}".replaceAll("\\{format\\}","json")
|
String localVarPath = "/user/{username}".replaceAll("\\{format\\}","json")
|
||||||
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
|
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -365,20 +365,20 @@ public class UserApi {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] localVarAuthNames = new String[] { };
|
||||||
|
|
||||||
|
|
||||||
apiClient.invokeAPI(path, "DELETE", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, null);
|
apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ import java.util.HashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-25T16:20:48.283+08:00")
|
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-29T12:55:37.248+08:00")
|
||||||
public class PetApi {
|
public class PetApi {
|
||||||
private ApiClient apiClient;
|
private ApiClient apiClient;
|
||||||
|
|
||||||
@ -43,15 +43,15 @@ public class PetApi {
|
|||||||
* @throws ApiException if fails to make API call
|
* @throws ApiException if fails to make API call
|
||||||
*/
|
*/
|
||||||
public void updatePet(Pet body) throws ApiException {
|
public void updatePet(Pet body) throws ApiException {
|
||||||
Object postBody = body;
|
Object localVarPostBody = body;
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/pet".replaceAll("\\{format\\}","json");
|
String localVarPath = "/pet".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -59,20 +59,20 @@ public class PetApi {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth" };
|
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||||
|
|
||||||
|
|
||||||
apiClient.invokeAPI(path, "PUT", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, null);
|
apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,15 +83,15 @@ public class PetApi {
|
|||||||
* @throws ApiException if fails to make API call
|
* @throws ApiException if fails to make API call
|
||||||
*/
|
*/
|
||||||
public void addPet(Pet body) throws ApiException {
|
public void addPet(Pet body) throws ApiException {
|
||||||
Object postBody = body;
|
Object localVarPostBody = body;
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/pet".replaceAll("\\{format\\}","json");
|
String localVarPath = "/pet".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -99,64 +99,64 @@ public class PetApi {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth" };
|
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||||
|
|
||||||
|
|
||||||
apiClient.invokeAPI(path, "POST", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, null);
|
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Finds Pets by status
|
* Finds Pets by status
|
||||||
* Multiple status values can be provided with comma seperated strings
|
* Multiple status values can be provided with comma separated strings
|
||||||
* @param status Status values that need to be considered for filter
|
* @param status Status values that need to be considered for query
|
||||||
* @return List<Pet>
|
* @return List<Pet>
|
||||||
* @throws ApiException if fails to make API call
|
* @throws ApiException if fails to make API call
|
||||||
*/
|
*/
|
||||||
public List<Pet> findPetsByStatus(List<String> status) throws ApiException {
|
public List<Pet> findPetsByStatus(List<String> status) throws ApiException {
|
||||||
Object postBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/pet/findByStatus".replaceAll("\\{format\\}","json");
|
String localVarPath = "/pet/findByStatus".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
queryParams.addAll(apiClient.parameterToPairs("multi", "status", status));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "status", status));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth" };
|
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||||
|
|
||||||
|
|
||||||
GenericType<List<Pet>> returnType = new GenericType<List<Pet>>() {};
|
GenericType<List<Pet>> localVarReturnType = new GenericType<List<Pet>>() {};
|
||||||
return apiClient.invokeAPI(path, "GET", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
|
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -168,39 +168,39 @@ public class PetApi {
|
|||||||
* @throws ApiException if fails to make API call
|
* @throws ApiException if fails to make API call
|
||||||
*/
|
*/
|
||||||
public List<Pet> findPetsByTags(List<String> tags) throws ApiException {
|
public List<Pet> findPetsByTags(List<String> tags) throws ApiException {
|
||||||
Object postBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/pet/findByTags".replaceAll("\\{format\\}","json");
|
String localVarPath = "/pet/findByTags".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
queryParams.addAll(apiClient.parameterToPairs("multi", "tags", tags));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "tags", tags));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth" };
|
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||||
|
|
||||||
|
|
||||||
GenericType<List<Pet>> returnType = new GenericType<List<Pet>>() {};
|
GenericType<List<Pet>> localVarReturnType = new GenericType<List<Pet>>() {};
|
||||||
return apiClient.invokeAPI(path, "GET", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
|
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -212,7 +212,7 @@ public class PetApi {
|
|||||||
* @throws ApiException if fails to make API call
|
* @throws ApiException if fails to make API call
|
||||||
*/
|
*/
|
||||||
public Pet getPetById(Long petId) throws ApiException {
|
public Pet getPetById(Long petId) throws ApiException {
|
||||||
Object postBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
// verify the required parameter 'petId' is set
|
||||||
if (petId == null) {
|
if (petId == null) {
|
||||||
@ -220,13 +220,13 @@ public class PetApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/pet/{petId}".replaceAll("\\{format\\}","json")
|
String localVarPath = "/pet/{petId}".replaceAll("\\{format\\}","json")
|
||||||
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -234,21 +234,21 @@ public class PetApi {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth", "api_key" };
|
String[] localVarAuthNames = new String[] { "petstore_auth", "api_key" };
|
||||||
|
|
||||||
|
|
||||||
GenericType<Pet> returnType = new GenericType<Pet>() {};
|
GenericType<Pet> localVarReturnType = new GenericType<Pet>() {};
|
||||||
return apiClient.invokeAPI(path, "GET", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
|
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -261,7 +261,7 @@ public class PetApi {
|
|||||||
* @throws ApiException if fails to make API call
|
* @throws ApiException if fails to make API call
|
||||||
*/
|
*/
|
||||||
public void updatePetWithForm(String petId, String name, String status) throws ApiException {
|
public void updatePetWithForm(String petId, String name, String status) throws ApiException {
|
||||||
Object postBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
// verify the required parameter 'petId' is set
|
||||||
if (petId == null) {
|
if (petId == null) {
|
||||||
@ -269,38 +269,38 @@ public class PetApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/pet/{petId}".replaceAll("\\{format\\}","json")
|
String localVarPath = "/pet/{petId}".replaceAll("\\{format\\}","json")
|
||||||
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (name != null)
|
if (name != null)
|
||||||
formParams.put("name", name);
|
localVarFormParams.put("name", name);
|
||||||
if (status != null)
|
if (status != null)
|
||||||
formParams.put("status", status);
|
localVarFormParams.put("status", status);
|
||||||
|
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
"application/x-www-form-urlencoded"
|
"application/x-www-form-urlencoded"
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth" };
|
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||||
|
|
||||||
|
|
||||||
apiClient.invokeAPI(path, "POST", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, null);
|
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -312,7 +312,7 @@ public class PetApi {
|
|||||||
* @throws ApiException if fails to make API call
|
* @throws ApiException if fails to make API call
|
||||||
*/
|
*/
|
||||||
public void deletePet(Long petId, String apiKey) throws ApiException {
|
public void deletePet(Long petId, String apiKey) throws ApiException {
|
||||||
Object postBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
// verify the required parameter 'petId' is set
|
||||||
if (petId == null) {
|
if (petId == null) {
|
||||||
@ -320,36 +320,36 @@ public class PetApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/pet/{petId}".replaceAll("\\{format\\}","json")
|
String localVarPath = "/pet/{petId}".replaceAll("\\{format\\}","json")
|
||||||
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (apiKey != null)
|
if (apiKey != null)
|
||||||
headerParams.put("api_key", apiClient.parameterToString(apiKey));
|
localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth" };
|
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||||
|
|
||||||
|
|
||||||
apiClient.invokeAPI(path, "DELETE", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, null);
|
apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -362,7 +362,7 @@ public class PetApi {
|
|||||||
* @throws ApiException if fails to make API call
|
* @throws ApiException if fails to make API call
|
||||||
*/
|
*/
|
||||||
public void uploadFile(Long petId, String additionalMetadata, File file) throws ApiException {
|
public void uploadFile(Long petId, String additionalMetadata, File file) throws ApiException {
|
||||||
Object postBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
// verify the required parameter 'petId' is set
|
||||||
if (petId == null) {
|
if (petId == null) {
|
||||||
@ -370,38 +370,38 @@ public class PetApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/pet/{petId}/uploadImage".replaceAll("\\{format\\}","json")
|
String localVarPath = "/pet/{petId}/uploadImage".replaceAll("\\{format\\}","json")
|
||||||
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (additionalMetadata != null)
|
if (additionalMetadata != null)
|
||||||
formParams.put("additionalMetadata", additionalMetadata);
|
localVarFormParams.put("additionalMetadata", additionalMetadata);
|
||||||
if (file != null)
|
if (file != null)
|
||||||
formParams.put("file", file);
|
localVarFormParams.put("file", file);
|
||||||
|
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
"multipart/form-data"
|
"multipart/form-data"
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth" };
|
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||||
|
|
||||||
|
|
||||||
apiClient.invokeAPI(path, "POST", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, null);
|
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -413,7 +413,7 @@ public class PetApi {
|
|||||||
* @throws ApiException if fails to make API call
|
* @throws ApiException if fails to make API call
|
||||||
*/
|
*/
|
||||||
public byte[] petPetIdtestingByteArraytrueGet(Long petId) throws ApiException {
|
public byte[] petPetIdtestingByteArraytrueGet(Long petId) throws ApiException {
|
||||||
Object postBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
// verify the required parameter 'petId' is set
|
||||||
if (petId == null) {
|
if (petId == null) {
|
||||||
@ -421,13 +421,13 @@ public class PetApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/pet/{petId}?testing_byte_array=true".replaceAll("\\{format\\}","json")
|
String localVarPath = "/pet/{petId}?testing_byte_array=true".replaceAll("\\{format\\}","json")
|
||||||
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -435,21 +435,21 @@ public class PetApi {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth", "api_key" };
|
String[] localVarAuthNames = new String[] { "petstore_auth", "api_key" };
|
||||||
|
|
||||||
|
|
||||||
GenericType<byte[]> returnType = new GenericType<byte[]>() {};
|
GenericType<byte[]> localVarReturnType = new GenericType<byte[]>() {};
|
||||||
return apiClient.invokeAPI(path, "GET", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
|
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -460,15 +460,15 @@ public class PetApi {
|
|||||||
* @throws ApiException if fails to make API call
|
* @throws ApiException if fails to make API call
|
||||||
*/
|
*/
|
||||||
public void addPetUsingByteArray(byte[] body) throws ApiException {
|
public void addPetUsingByteArray(byte[] body) throws ApiException {
|
||||||
Object postBody = body;
|
Object localVarPostBody = body;
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/pet?testing_byte_array=true".replaceAll("\\{format\\}","json");
|
String localVarPath = "/pet?testing_byte_array=true".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -476,20 +476,20 @@ public class PetApi {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth" };
|
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||||
|
|
||||||
|
|
||||||
apiClient.invokeAPI(path, "POST", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, null);
|
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ import java.util.HashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-23T20:02:09.740+08:00")
|
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-29T12:55:37.248+08:00")
|
||||||
public class StoreApi {
|
public class StoreApi {
|
||||||
private ApiClient apiClient;
|
private ApiClient apiClient;
|
||||||
|
|
||||||
@ -35,6 +35,50 @@ public class StoreApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finds orders by status
|
||||||
|
* A single status value can be provided as a string
|
||||||
|
* @param status Status value that needs to be considered for query
|
||||||
|
* @return List<Order>
|
||||||
|
* @throws ApiException if fails to make API call
|
||||||
|
*/
|
||||||
|
public List<Order> findOrdersByStatus(String status) throws ApiException {
|
||||||
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
|
// create path and map variables
|
||||||
|
String localVarPath = "/store/findByStatus".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
|
// query params
|
||||||
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
|
localVarQueryParams.addAll(apiClient.parameterToPairs("", "status", status));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
final String[] localVarAccepts = {
|
||||||
|
"application/json", "application/xml"
|
||||||
|
};
|
||||||
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
|
};
|
||||||
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
|
String[] localVarAuthNames = new String[] { "test_api_client_id", "test_api_client_secret" };
|
||||||
|
|
||||||
|
|
||||||
|
GenericType<List<Order>> localVarReturnType = new GenericType<List<Order>>() {};
|
||||||
|
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns pet inventories by status
|
* Returns pet inventories by status
|
||||||
* Returns a map of status codes to quantities
|
* Returns a map of status codes to quantities
|
||||||
@ -42,15 +86,15 @@ public class StoreApi {
|
|||||||
* @throws ApiException if fails to make API call
|
* @throws ApiException if fails to make API call
|
||||||
*/
|
*/
|
||||||
public Map<String, Integer> getInventory() throws ApiException {
|
public Map<String, Integer> getInventory() throws ApiException {
|
||||||
Object postBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/store/inventory".replaceAll("\\{format\\}","json");
|
String localVarPath = "/store/inventory".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -58,21 +102,21 @@ public class StoreApi {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
String[] authNames = new String[] { "api_key" };
|
String[] localVarAuthNames = new String[] { "api_key" };
|
||||||
|
|
||||||
|
|
||||||
GenericType<Map<String, Integer>> returnType = new GenericType<Map<String, Integer>>() {};
|
GenericType<Map<String, Integer>> localVarReturnType = new GenericType<Map<String, Integer>>() {};
|
||||||
return apiClient.invokeAPI(path, "GET", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
|
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,15 +128,15 @@ public class StoreApi {
|
|||||||
* @throws ApiException if fails to make API call
|
* @throws ApiException if fails to make API call
|
||||||
*/
|
*/
|
||||||
public Order placeOrder(Order body) throws ApiException {
|
public Order placeOrder(Order body) throws ApiException {
|
||||||
Object postBody = body;
|
Object localVarPostBody = body;
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/store/order".replaceAll("\\{format\\}","json");
|
String localVarPath = "/store/order".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -100,21 +144,21 @@ public class StoreApi {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
String[] authNames = new String[] { "test_api_client_id", "test_api_client_secret" };
|
String[] localVarAuthNames = new String[] { "test_api_client_id", "test_api_client_secret" };
|
||||||
|
|
||||||
|
|
||||||
GenericType<Order> returnType = new GenericType<Order>() {};
|
GenericType<Order> localVarReturnType = new GenericType<Order>() {};
|
||||||
return apiClient.invokeAPI(path, "POST", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
|
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -126,7 +170,7 @@ public class StoreApi {
|
|||||||
* @throws ApiException if fails to make API call
|
* @throws ApiException if fails to make API call
|
||||||
*/
|
*/
|
||||||
public Order getOrderById(String orderId) throws ApiException {
|
public Order getOrderById(String orderId) throws ApiException {
|
||||||
Object postBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
// verify the required parameter 'orderId' is set
|
// verify the required parameter 'orderId' is set
|
||||||
if (orderId == null) {
|
if (orderId == null) {
|
||||||
@ -134,13 +178,13 @@ public class StoreApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/store/order/{orderId}".replaceAll("\\{format\\}","json")
|
String localVarPath = "/store/order/{orderId}".replaceAll("\\{format\\}","json")
|
||||||
.replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString()));
|
.replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString()));
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -148,21 +192,21 @@ public class StoreApi {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
String[] authNames = new String[] { "test_api_key_query", "test_api_key_header" };
|
String[] localVarAuthNames = new String[] { "test_api_key_query", "test_api_key_header" };
|
||||||
|
|
||||||
|
|
||||||
GenericType<Order> returnType = new GenericType<Order>() {};
|
GenericType<Order> localVarReturnType = new GenericType<Order>() {};
|
||||||
return apiClient.invokeAPI(path, "GET", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
|
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -173,7 +217,7 @@ public class StoreApi {
|
|||||||
* @throws ApiException if fails to make API call
|
* @throws ApiException if fails to make API call
|
||||||
*/
|
*/
|
||||||
public void deleteOrder(String orderId) throws ApiException {
|
public void deleteOrder(String orderId) throws ApiException {
|
||||||
Object postBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
// verify the required parameter 'orderId' is set
|
// verify the required parameter 'orderId' is set
|
||||||
if (orderId == null) {
|
if (orderId == null) {
|
||||||
@ -181,13 +225,13 @@ public class StoreApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/store/order/{orderId}".replaceAll("\\{format\\}","json")
|
String localVarPath = "/store/order/{orderId}".replaceAll("\\{format\\}","json")
|
||||||
.replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString()));
|
.replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString()));
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -195,20 +239,20 @@ public class StoreApi {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] localVarAuthNames = new String[] { };
|
||||||
|
|
||||||
|
|
||||||
apiClient.invokeAPI(path, "DELETE", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, null);
|
apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ import java.util.HashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-23T20:02:09.740+08:00")
|
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-29T12:55:37.248+08:00")
|
||||||
public class UserApi {
|
public class UserApi {
|
||||||
private ApiClient apiClient;
|
private ApiClient apiClient;
|
||||||
|
|
||||||
@ -42,15 +42,15 @@ public class UserApi {
|
|||||||
* @throws ApiException if fails to make API call
|
* @throws ApiException if fails to make API call
|
||||||
*/
|
*/
|
||||||
public void createUser(User body) throws ApiException {
|
public void createUser(User body) throws ApiException {
|
||||||
Object postBody = body;
|
Object localVarPostBody = body;
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/user".replaceAll("\\{format\\}","json");
|
String localVarPath = "/user".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -58,20 +58,20 @@ public class UserApi {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] localVarAuthNames = new String[] { };
|
||||||
|
|
||||||
|
|
||||||
apiClient.invokeAPI(path, "POST", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, null);
|
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -82,15 +82,15 @@ public class UserApi {
|
|||||||
* @throws ApiException if fails to make API call
|
* @throws ApiException if fails to make API call
|
||||||
*/
|
*/
|
||||||
public void createUsersWithArrayInput(List<User> body) throws ApiException {
|
public void createUsersWithArrayInput(List<User> body) throws ApiException {
|
||||||
Object postBody = body;
|
Object localVarPostBody = body;
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/user/createWithArray".replaceAll("\\{format\\}","json");
|
String localVarPath = "/user/createWithArray".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -98,20 +98,20 @@ public class UserApi {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] localVarAuthNames = new String[] { };
|
||||||
|
|
||||||
|
|
||||||
apiClient.invokeAPI(path, "POST", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, null);
|
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -122,15 +122,15 @@ public class UserApi {
|
|||||||
* @throws ApiException if fails to make API call
|
* @throws ApiException if fails to make API call
|
||||||
*/
|
*/
|
||||||
public void createUsersWithListInput(List<User> body) throws ApiException {
|
public void createUsersWithListInput(List<User> body) throws ApiException {
|
||||||
Object postBody = body;
|
Object localVarPostBody = body;
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/user/createWithList".replaceAll("\\{format\\}","json");
|
String localVarPath = "/user/createWithList".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -138,20 +138,20 @@ public class UserApi {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] localVarAuthNames = new String[] { };
|
||||||
|
|
||||||
|
|
||||||
apiClient.invokeAPI(path, "POST", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, null);
|
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -164,41 +164,41 @@ public class UserApi {
|
|||||||
* @throws ApiException if fails to make API call
|
* @throws ApiException if fails to make API call
|
||||||
*/
|
*/
|
||||||
public String loginUser(String username, String password) throws ApiException {
|
public String loginUser(String username, String password) throws ApiException {
|
||||||
Object postBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/user/login".replaceAll("\\{format\\}","json");
|
String localVarPath = "/user/login".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
queryParams.addAll(apiClient.parameterToPairs("", "username", username));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("", "username", username));
|
||||||
|
|
||||||
queryParams.addAll(apiClient.parameterToPairs("", "password", password));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("", "password", password));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] localVarAuthNames = new String[] { };
|
||||||
|
|
||||||
|
|
||||||
GenericType<String> returnType = new GenericType<String>() {};
|
GenericType<String> localVarReturnType = new GenericType<String>() {};
|
||||||
return apiClient.invokeAPI(path, "GET", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
|
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -208,15 +208,15 @@ public class UserApi {
|
|||||||
* @throws ApiException if fails to make API call
|
* @throws ApiException if fails to make API call
|
||||||
*/
|
*/
|
||||||
public void logoutUser() throws ApiException {
|
public void logoutUser() throws ApiException {
|
||||||
Object postBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/user/logout".replaceAll("\\{format\\}","json");
|
String localVarPath = "/user/logout".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -224,20 +224,20 @@ public class UserApi {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] localVarAuthNames = new String[] { };
|
||||||
|
|
||||||
|
|
||||||
apiClient.invokeAPI(path, "GET", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, null);
|
apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -249,7 +249,7 @@ public class UserApi {
|
|||||||
* @throws ApiException if fails to make API call
|
* @throws ApiException if fails to make API call
|
||||||
*/
|
*/
|
||||||
public User getUserByName(String username) throws ApiException {
|
public User getUserByName(String username) throws ApiException {
|
||||||
Object postBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
// verify the required parameter 'username' is set
|
// verify the required parameter 'username' is set
|
||||||
if (username == null) {
|
if (username == null) {
|
||||||
@ -257,13 +257,13 @@ public class UserApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/user/{username}".replaceAll("\\{format\\}","json")
|
String localVarPath = "/user/{username}".replaceAll("\\{format\\}","json")
|
||||||
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
|
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -271,21 +271,21 @@ public class UserApi {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] localVarAuthNames = new String[] { };
|
||||||
|
|
||||||
|
|
||||||
GenericType<User> returnType = new GenericType<User>() {};
|
GenericType<User> localVarReturnType = new GenericType<User>() {};
|
||||||
return apiClient.invokeAPI(path, "GET", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
|
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -297,7 +297,7 @@ public class UserApi {
|
|||||||
* @throws ApiException if fails to make API call
|
* @throws ApiException if fails to make API call
|
||||||
*/
|
*/
|
||||||
public void updateUser(String username, User body) throws ApiException {
|
public void updateUser(String username, User body) throws ApiException {
|
||||||
Object postBody = body;
|
Object localVarPostBody = body;
|
||||||
|
|
||||||
// verify the required parameter 'username' is set
|
// verify the required parameter 'username' is set
|
||||||
if (username == null) {
|
if (username == null) {
|
||||||
@ -305,13 +305,13 @@ public class UserApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/user/{username}".replaceAll("\\{format\\}","json")
|
String localVarPath = "/user/{username}".replaceAll("\\{format\\}","json")
|
||||||
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
|
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -319,20 +319,20 @@ public class UserApi {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] localVarAuthNames = new String[] { };
|
||||||
|
|
||||||
|
|
||||||
apiClient.invokeAPI(path, "PUT", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, null);
|
apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -343,7 +343,7 @@ public class UserApi {
|
|||||||
* @throws ApiException if fails to make API call
|
* @throws ApiException if fails to make API call
|
||||||
*/
|
*/
|
||||||
public void deleteUser(String username) throws ApiException {
|
public void deleteUser(String username) throws ApiException {
|
||||||
Object postBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
// verify the required parameter 'username' is set
|
// verify the required parameter 'username' is set
|
||||||
if (username == null) {
|
if (username == null) {
|
||||||
@ -351,13 +351,13 @@ public class UserApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/user/{username}".replaceAll("\\{format\\}","json")
|
String localVarPath = "/user/{username}".replaceAll("\\{format\\}","json")
|
||||||
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
|
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
|
||||||
|
|
||||||
// query params
|
// query params
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -365,20 +365,20 @@ public class UserApi {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] localVarAuthNames = new String[] { };
|
||||||
|
|
||||||
|
|
||||||
apiClient.invokeAPI(path, "DELETE", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, null);
|
apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,29 +48,29 @@ public class PetApi {
|
|||||||
|
|
||||||
/* Build call for updatePet */
|
/* Build call for updatePet */
|
||||||
private Call updatePetCall(Pet body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
private Call updatePetCall(Pet body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||||
Object postBody = body;
|
Object localVarPostBody = body;
|
||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/pet".replaceAll("\\{format\\}","json");
|
String localVarPath = "/pet".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
|
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
|
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
if (accept != null) headerParams.put("Accept", accept);
|
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
headerParams.put("Content-Type", contentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
|
|
||||||
if(progressListener != null) {
|
if(progressListener != null) {
|
||||||
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
||||||
@ -84,8 +84,8 @@ public class PetApi {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth" };
|
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||||
return apiClient.buildCall(path, "PUT", queryParams, postBody, headerParams, formParams, authNames, progressRequestListener);
|
return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -128,7 +128,7 @@ public class PetApi {
|
|||||||
@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() {
|
||||||
@ -146,29 +146,29 @@ public class PetApi {
|
|||||||
|
|
||||||
/* Build call for addPet */
|
/* Build call for addPet */
|
||||||
private Call addPetCall(Pet body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
private Call addPetCall(Pet body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||||
Object postBody = body;
|
Object localVarPostBody = body;
|
||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/pet".replaceAll("\\{format\\}","json");
|
String localVarPath = "/pet".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
|
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
|
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
if (accept != null) headerParams.put("Accept", accept);
|
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
headerParams.put("Content-Type", contentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
|
|
||||||
if(progressListener != null) {
|
if(progressListener != null) {
|
||||||
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
||||||
@ -182,8 +182,8 @@ public class PetApi {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth" };
|
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||||
return apiClient.buildCall(path, "POST", queryParams, postBody, headerParams, formParams, authNames, progressRequestListener);
|
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -226,7 +226,7 @@ public class PetApi {
|
|||||||
@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() {
|
||||||
@ -244,31 +244,31 @@ public class PetApi {
|
|||||||
|
|
||||||
/* Build call for findPetsByStatus */
|
/* Build call for findPetsByStatus */
|
||||||
private Call findPetsByStatusCall(List<String> status, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
private Call findPetsByStatusCall(List<String> status, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||||
Object postBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/pet/findByStatus".replaceAll("\\{format\\}","json");
|
String localVarPath = "/pet/findByStatus".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
if (status != null)
|
if (status != null)
|
||||||
queryParams.addAll(apiClient.parameterToPairs("multi", "status", status));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "status", status));
|
||||||
|
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
|
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
if (accept != null) headerParams.put("Accept", accept);
|
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
headerParams.put("Content-Type", contentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
|
|
||||||
if(progressListener != null) {
|
if(progressListener != null) {
|
||||||
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
||||||
@ -282,14 +282,14 @@ public class PetApi {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth" };
|
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||||
return apiClient.buildCall(path, "GET", queryParams, postBody, headerParams, formParams, authNames, progressRequestListener);
|
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Finds Pets by status
|
* Finds Pets by status
|
||||||
* Multiple status values can be provided with comma seperated strings
|
* Multiple status values can be provided with comma separated strings
|
||||||
* @param status Status values that need to be considered for filter
|
* @param status Status values that need to be considered for query
|
||||||
* @return List<Pet>
|
* @return List<Pet>
|
||||||
* @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
|
||||||
*/
|
*/
|
||||||
@ -300,21 +300,21 @@ public class PetApi {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Finds Pets by status
|
* Finds Pets by status
|
||||||
* Multiple status values can be provided with comma seperated strings
|
* Multiple status values can be provided with comma separated strings
|
||||||
* @param status Status values that need to be considered for filter
|
* @param status Status values that need to be considered for query
|
||||||
* @return ApiResponse<List<Pet>>
|
* @return ApiResponse<List<Pet>>
|
||||||
* @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<List<Pet>> findPetsByStatusWithHttpInfo(List<String> status) throws ApiException {
|
public ApiResponse<List<Pet>> findPetsByStatusWithHttpInfo(List<String> status) throws ApiException {
|
||||||
Call call = findPetsByStatusCall(status, null, null);
|
Call call = findPetsByStatusCall(status, null, null);
|
||||||
Type returnType = new TypeToken<List<Pet>>(){}.getType();
|
Type localVarReturnType = new TypeToken<List<Pet>>(){}.getType();
|
||||||
return apiClient.execute(call, returnType);
|
return apiClient.execute(call, localVarReturnType);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Finds Pets by status (asynchronously)
|
* Finds Pets by status (asynchronously)
|
||||||
* Multiple status values can be provided with comma seperated strings
|
* Multiple status values can be provided with comma separated strings
|
||||||
* @param status Status values that need to be considered for filter
|
* @param status Status values that need to be considered for query
|
||||||
* @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
|
||||||
@ -329,7 +329,7 @@ public class PetApi {
|
|||||||
@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() {
|
||||||
@ -341,38 +341,38 @@ public class PetApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Call call = findPetsByStatusCall(status, progressListener, progressRequestListener);
|
Call call = findPetsByStatusCall(status, progressListener, progressRequestListener);
|
||||||
Type returnType = new TypeToken<List<Pet>>(){}.getType();
|
Type localVarReturnType = new TypeToken<List<Pet>>(){}.getType();
|
||||||
apiClient.executeAsync(call, returnType, callback);
|
apiClient.executeAsync(call, localVarReturnType, callback);
|
||||||
return call;
|
return call;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Build call for findPetsByTags */
|
/* Build call for findPetsByTags */
|
||||||
private Call findPetsByTagsCall(List<String> tags, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
private Call findPetsByTagsCall(List<String> tags, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||||
Object postBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/pet/findByTags".replaceAll("\\{format\\}","json");
|
String localVarPath = "/pet/findByTags".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
if (tags != null)
|
if (tags != null)
|
||||||
queryParams.addAll(apiClient.parameterToPairs("multi", "tags", tags));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "tags", tags));
|
||||||
|
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
|
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
if (accept != null) headerParams.put("Accept", accept);
|
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
headerParams.put("Content-Type", contentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
|
|
||||||
if(progressListener != null) {
|
if(progressListener != null) {
|
||||||
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
||||||
@ -386,8 +386,8 @@ public class PetApi {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth" };
|
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||||
return apiClient.buildCall(path, "GET", queryParams, postBody, headerParams, formParams, authNames, progressRequestListener);
|
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -411,8 +411,8 @@ public class PetApi {
|
|||||||
*/
|
*/
|
||||||
public ApiResponse<List<Pet>> findPetsByTagsWithHttpInfo(List<String> tags) throws ApiException {
|
public ApiResponse<List<Pet>> findPetsByTagsWithHttpInfo(List<String> tags) throws ApiException {
|
||||||
Call call = findPetsByTagsCall(tags, null, null);
|
Call call = findPetsByTagsCall(tags, null, null);
|
||||||
Type returnType = new TypeToken<List<Pet>>(){}.getType();
|
Type localVarReturnType = new TypeToken<List<Pet>>(){}.getType();
|
||||||
return apiClient.execute(call, returnType);
|
return apiClient.execute(call, localVarReturnType);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -433,7 +433,7 @@ public class PetApi {
|
|||||||
@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() {
|
||||||
@ -445,14 +445,14 @@ public class PetApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Call call = findPetsByTagsCall(tags, progressListener, progressRequestListener);
|
Call call = findPetsByTagsCall(tags, progressListener, progressRequestListener);
|
||||||
Type returnType = new TypeToken<List<Pet>>(){}.getType();
|
Type localVarReturnType = new TypeToken<List<Pet>>(){}.getType();
|
||||||
apiClient.executeAsync(call, returnType, callback);
|
apiClient.executeAsync(call, localVarReturnType, callback);
|
||||||
return call;
|
return call;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Build call for getPetById */
|
/* Build call for getPetById */
|
||||||
private Call getPetByIdCall(Long petId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
private Call getPetByIdCall(Long petId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||||
Object postBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
// verify the required parameter 'petId' is set
|
||||||
if (petId == null) {
|
if (petId == null) {
|
||||||
@ -461,26 +461,26 @@ public class PetApi {
|
|||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/pet/{petId}".replaceAll("\\{format\\}","json")
|
String localVarPath = "/pet/{petId}".replaceAll("\\{format\\}","json")
|
||||||
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
||||||
|
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
|
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
|
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
if (accept != null) headerParams.put("Accept", accept);
|
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
headerParams.put("Content-Type", contentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
|
|
||||||
if(progressListener != null) {
|
if(progressListener != null) {
|
||||||
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
||||||
@ -494,8 +494,8 @@ public class PetApi {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth", "api_key" };
|
String[] localVarAuthNames = new String[] { "petstore_auth", "api_key" };
|
||||||
return apiClient.buildCall(path, "GET", queryParams, postBody, headerParams, formParams, authNames, progressRequestListener);
|
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -519,8 +519,8 @@ public class PetApi {
|
|||||||
*/
|
*/
|
||||||
public ApiResponse<Pet> getPetByIdWithHttpInfo(Long petId) throws ApiException {
|
public ApiResponse<Pet> getPetByIdWithHttpInfo(Long petId) throws ApiException {
|
||||||
Call call = getPetByIdCall(petId, null, null);
|
Call call = getPetByIdCall(petId, null, null);
|
||||||
Type returnType = new TypeToken<Pet>(){}.getType();
|
Type localVarReturnType = new TypeToken<Pet>(){}.getType();
|
||||||
return apiClient.execute(call, returnType);
|
return apiClient.execute(call, localVarReturnType);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -541,7 +541,7 @@ public class PetApi {
|
|||||||
@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() {
|
||||||
@ -553,14 +553,14 @@ public class PetApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Call call = getPetByIdCall(petId, progressListener, progressRequestListener);
|
Call call = getPetByIdCall(petId, progressListener, progressRequestListener);
|
||||||
Type returnType = new TypeToken<Pet>(){}.getType();
|
Type localVarReturnType = new TypeToken<Pet>(){}.getType();
|
||||||
apiClient.executeAsync(call, returnType, callback);
|
apiClient.executeAsync(call, localVarReturnType, callback);
|
||||||
return call;
|
return call;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Build call for updatePetWithForm */
|
/* Build call for updatePetWithForm */
|
||||||
private Call updatePetWithFormCall(String petId, String name, String status, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
private Call updatePetWithFormCall(String petId, String name, String status, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||||
Object postBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
// verify the required parameter 'petId' is set
|
||||||
if (petId == null) {
|
if (petId == null) {
|
||||||
@ -569,30 +569,30 @@ public class PetApi {
|
|||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/pet/{petId}".replaceAll("\\{format\\}","json")
|
String localVarPath = "/pet/{petId}".replaceAll("\\{format\\}","json")
|
||||||
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
||||||
|
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
|
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
|
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
if (name != null)
|
if (name != null)
|
||||||
formParams.put("name", name);
|
localVarFormParams.put("name", name);
|
||||||
if (status != null)
|
if (status != null)
|
||||||
formParams.put("status", status);
|
localVarFormParams.put("status", status);
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
if (accept != null) headerParams.put("Accept", accept);
|
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
"application/x-www-form-urlencoded"
|
"application/x-www-form-urlencoded"
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
headerParams.put("Content-Type", contentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
|
|
||||||
if(progressListener != null) {
|
if(progressListener != null) {
|
||||||
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
||||||
@ -606,8 +606,8 @@ public class PetApi {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth" };
|
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||||
return apiClient.buildCall(path, "POST", queryParams, postBody, headerParams, formParams, authNames, progressRequestListener);
|
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -656,7 +656,7 @@ public class PetApi {
|
|||||||
@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() {
|
||||||
@ -674,7 +674,7 @@ public class PetApi {
|
|||||||
|
|
||||||
/* Build call for deletePet */
|
/* Build call for deletePet */
|
||||||
private Call deletePetCall(Long petId, String apiKey, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
private Call deletePetCall(Long petId, String apiKey, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||||
Object postBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
// verify the required parameter 'petId' is set
|
||||||
if (petId == null) {
|
if (petId == null) {
|
||||||
@ -683,28 +683,28 @@ public class PetApi {
|
|||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/pet/{petId}".replaceAll("\\{format\\}","json")
|
String localVarPath = "/pet/{petId}".replaceAll("\\{format\\}","json")
|
||||||
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
||||||
|
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
|
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
if (apiKey != null)
|
if (apiKey != null)
|
||||||
headerParams.put("api_key", apiClient.parameterToString(apiKey));
|
localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey));
|
||||||
|
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
if (accept != null) headerParams.put("Accept", accept);
|
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
headerParams.put("Content-Type", contentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
|
|
||||||
if(progressListener != null) {
|
if(progressListener != null) {
|
||||||
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
||||||
@ -718,8 +718,8 @@ public class PetApi {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth" };
|
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||||
return apiClient.buildCall(path, "DELETE", queryParams, postBody, headerParams, formParams, authNames, progressRequestListener);
|
return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -765,7 +765,7 @@ public class PetApi {
|
|||||||
@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() {
|
||||||
@ -783,7 +783,7 @@ public class PetApi {
|
|||||||
|
|
||||||
/* Build call for uploadFile */
|
/* Build call for uploadFile */
|
||||||
private Call uploadFileCall(Long petId, String additionalMetadata, File file, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
private Call uploadFileCall(Long petId, String additionalMetadata, File file, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||||
Object postBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
// verify the required parameter 'petId' is set
|
||||||
if (petId == null) {
|
if (petId == null) {
|
||||||
@ -792,30 +792,30 @@ public class PetApi {
|
|||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/pet/{petId}/uploadImage".replaceAll("\\{format\\}","json")
|
String localVarPath = "/pet/{petId}/uploadImage".replaceAll("\\{format\\}","json")
|
||||||
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
||||||
|
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
|
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
|
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
if (additionalMetadata != null)
|
if (additionalMetadata != null)
|
||||||
formParams.put("additionalMetadata", additionalMetadata);
|
localVarFormParams.put("additionalMetadata", additionalMetadata);
|
||||||
if (file != null)
|
if (file != null)
|
||||||
formParams.put("file", file);
|
localVarFormParams.put("file", file);
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
if (accept != null) headerParams.put("Accept", accept);
|
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
"multipart/form-data"
|
"multipart/form-data"
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
headerParams.put("Content-Type", contentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
|
|
||||||
if(progressListener != null) {
|
if(progressListener != null) {
|
||||||
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
||||||
@ -829,8 +829,8 @@ public class PetApi {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth" };
|
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||||
return apiClient.buildCall(path, "POST", queryParams, postBody, headerParams, formParams, authNames, progressRequestListener);
|
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -879,7 +879,7 @@ public class PetApi {
|
|||||||
@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() {
|
||||||
@ -897,7 +897,7 @@ public class PetApi {
|
|||||||
|
|
||||||
/* Build call for petPetIdtestingByteArraytrueGet */
|
/* Build call for petPetIdtestingByteArraytrueGet */
|
||||||
private Call petPetIdtestingByteArraytrueGetCall(Long petId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
private Call petPetIdtestingByteArraytrueGetCall(Long petId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||||
Object postBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
// verify the required parameter 'petId' is set
|
||||||
if (petId == null) {
|
if (petId == null) {
|
||||||
@ -906,26 +906,26 @@ public class PetApi {
|
|||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/pet/{petId}?testing_byte_array=true".replaceAll("\\{format\\}","json")
|
String localVarPath = "/pet/{petId}?testing_byte_array=true".replaceAll("\\{format\\}","json")
|
||||||
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
||||||
|
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
|
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
|
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
if (accept != null) headerParams.put("Accept", accept);
|
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
headerParams.put("Content-Type", contentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
|
|
||||||
if(progressListener != null) {
|
if(progressListener != null) {
|
||||||
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
||||||
@ -939,8 +939,8 @@ public class PetApi {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth", "api_key" };
|
String[] localVarAuthNames = new String[] { "petstore_auth", "api_key" };
|
||||||
return apiClient.buildCall(path, "GET", queryParams, postBody, headerParams, formParams, authNames, progressRequestListener);
|
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -964,8 +964,8 @@ public class PetApi {
|
|||||||
*/
|
*/
|
||||||
public ApiResponse<byte[]> petPetIdtestingByteArraytrueGetWithHttpInfo(Long petId) throws ApiException {
|
public ApiResponse<byte[]> petPetIdtestingByteArraytrueGetWithHttpInfo(Long petId) throws ApiException {
|
||||||
Call call = petPetIdtestingByteArraytrueGetCall(petId, null, null);
|
Call call = petPetIdtestingByteArraytrueGetCall(petId, null, null);
|
||||||
Type returnType = new TypeToken<byte[]>(){}.getType();
|
Type localVarReturnType = new TypeToken<byte[]>(){}.getType();
|
||||||
return apiClient.execute(call, returnType);
|
return apiClient.execute(call, localVarReturnType);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -986,7 +986,7 @@ public class PetApi {
|
|||||||
@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() {
|
||||||
@ -998,36 +998,36 @@ public class PetApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Call call = petPetIdtestingByteArraytrueGetCall(petId, progressListener, progressRequestListener);
|
Call call = petPetIdtestingByteArraytrueGetCall(petId, progressListener, progressRequestListener);
|
||||||
Type returnType = new TypeToken<byte[]>(){}.getType();
|
Type localVarReturnType = new TypeToken<byte[]>(){}.getType();
|
||||||
apiClient.executeAsync(call, returnType, callback);
|
apiClient.executeAsync(call, localVarReturnType, callback);
|
||||||
return call;
|
return call;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Build call for addPetUsingByteArray */
|
/* Build call for addPetUsingByteArray */
|
||||||
private Call addPetUsingByteArrayCall(byte[] body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
private Call addPetUsingByteArrayCall(byte[] body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||||
Object postBody = body;
|
Object localVarPostBody = body;
|
||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/pet?testing_byte_array=true".replaceAll("\\{format\\}","json");
|
String localVarPath = "/pet?testing_byte_array=true".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
|
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
|
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
if (accept != null) headerParams.put("Accept", accept);
|
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
headerParams.put("Content-Type", contentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
|
|
||||||
if(progressListener != null) {
|
if(progressListener != null) {
|
||||||
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
||||||
@ -1041,8 +1041,8 @@ public class PetApi {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth" };
|
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||||
return apiClient.buildCall(path, "POST", queryParams, postBody, headerParams, formParams, authNames, progressRequestListener);
|
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1085,7 +1085,7 @@ public class PetApi {
|
|||||||
@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() {
|
||||||
|
@ -45,31 +45,33 @@ public class StoreApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Build call for getInventory */
|
/* Build call for findOrdersByStatus */
|
||||||
private Call getInventoryCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
private Call findOrdersByStatusCall(String status, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||||
Object postBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/store/inventory".replaceAll("\\{format\\}","json");
|
String localVarPath = "/store/findByStatus".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
|
if (status != null)
|
||||||
|
localVarQueryParams.addAll(apiClient.parameterToPairs("", "status", status));
|
||||||
|
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
|
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
if (accept != null) headerParams.put("Accept", accept);
|
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
headerParams.put("Content-Type", contentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
|
|
||||||
if(progressListener != null) {
|
if(progressListener != null) {
|
||||||
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
||||||
@ -83,8 +85,110 @@ public class StoreApi {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] authNames = new String[] { "api_key" };
|
String[] localVarAuthNames = new String[] { "test_api_client_id", "test_api_client_secret" };
|
||||||
return apiClient.buildCall(path, "GET", queryParams, postBody, headerParams, formParams, authNames, progressRequestListener);
|
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finds orders by status
|
||||||
|
* A single status value can be provided as a string
|
||||||
|
* @param status Status value that needs to be considered for query
|
||||||
|
* @return List<Order>
|
||||||
|
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||||
|
*/
|
||||||
|
public List<Order> findOrdersByStatus(String status) throws ApiException {
|
||||||
|
ApiResponse<List<Order>> resp = findOrdersByStatusWithHttpInfo(status);
|
||||||
|
return resp.getData();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finds orders by status
|
||||||
|
* A single status value can be provided as a string
|
||||||
|
* @param status Status value that needs to be considered for query
|
||||||
|
* @return ApiResponse<List<Order>>
|
||||||
|
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||||
|
*/
|
||||||
|
public ApiResponse<List<Order>> findOrdersByStatusWithHttpInfo(String status) throws ApiException {
|
||||||
|
Call call = findOrdersByStatusCall(status, null, null);
|
||||||
|
Type localVarReturnType = new TypeToken<List<Order>>(){}.getType();
|
||||||
|
return apiClient.execute(call, localVarReturnType);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finds orders by status (asynchronously)
|
||||||
|
* A single status value can be provided as a string
|
||||||
|
* @param status Status value that needs to be considered for query
|
||||||
|
* @param callback The callback to be executed when the API call finishes
|
||||||
|
* @return The request call
|
||||||
|
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
|
||||||
|
*/
|
||||||
|
public Call findOrdersByStatusAsync(String status, final ApiCallback<List<Order>> callback) throws ApiException {
|
||||||
|
|
||||||
|
ProgressResponseBody.ProgressListener progressListener = null;
|
||||||
|
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
|
||||||
|
|
||||||
|
if (callback != null) {
|
||||||
|
progressListener = new ProgressResponseBody.ProgressListener() {
|
||||||
|
@Override
|
||||||
|
public void update(long bytesRead, long contentLength, boolean done) {
|
||||||
|
callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||||
|
@Override
|
||||||
|
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||||
|
callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
Call call = findOrdersByStatusCall(status, progressListener, progressRequestListener);
|
||||||
|
Type localVarReturnType = new TypeToken<List<Order>>(){}.getType();
|
||||||
|
apiClient.executeAsync(call, localVarReturnType, callback);
|
||||||
|
return call;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Build call for getInventory */
|
||||||
|
private Call getInventoryCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||||
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
|
|
||||||
|
// create path and map variables
|
||||||
|
String localVarPath = "/store/inventory".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
|
|
||||||
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
|
|
||||||
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
final String[] localVarAccepts = {
|
||||||
|
"application/json", "application/xml"
|
||||||
|
};
|
||||||
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
|
||||||
|
|
||||||
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
|
};
|
||||||
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
|
|
||||||
|
if(progressListener != null) {
|
||||||
|
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
||||||
|
@Override
|
||||||
|
public Response intercept(Interceptor.Chain chain) throws IOException {
|
||||||
|
Response originalResponse = chain.proceed(chain.request());
|
||||||
|
return originalResponse.newBuilder()
|
||||||
|
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
String[] localVarAuthNames = new String[] { "api_key" };
|
||||||
|
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -106,8 +210,8 @@ public class StoreApi {
|
|||||||
*/
|
*/
|
||||||
public ApiResponse<Map<String, Integer>> getInventoryWithHttpInfo() throws ApiException {
|
public ApiResponse<Map<String, Integer>> getInventoryWithHttpInfo() throws ApiException {
|
||||||
Call call = getInventoryCall(null, null);
|
Call call = getInventoryCall(null, null);
|
||||||
Type returnType = new TypeToken<Map<String, Integer>>(){}.getType();
|
Type localVarReturnType = new TypeToken<Map<String, Integer>>(){}.getType();
|
||||||
return apiClient.execute(call, returnType);
|
return apiClient.execute(call, localVarReturnType);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -127,7 +231,7 @@ public class StoreApi {
|
|||||||
@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() {
|
||||||
@ -139,36 +243,36 @@ public class StoreApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Call call = getInventoryCall(progressListener, progressRequestListener);
|
Call call = getInventoryCall(progressListener, progressRequestListener);
|
||||||
Type returnType = new TypeToken<Map<String, Integer>>(){}.getType();
|
Type localVarReturnType = new TypeToken<Map<String, Integer>>(){}.getType();
|
||||||
apiClient.executeAsync(call, returnType, callback);
|
apiClient.executeAsync(call, localVarReturnType, callback);
|
||||||
return call;
|
return call;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Build call for placeOrder */
|
/* Build call for placeOrder */
|
||||||
private Call placeOrderCall(Order body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
private Call placeOrderCall(Order body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||||
Object postBody = body;
|
Object localVarPostBody = body;
|
||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/store/order".replaceAll("\\{format\\}","json");
|
String localVarPath = "/store/order".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
|
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
|
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
if (accept != null) headerParams.put("Accept", accept);
|
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
headerParams.put("Content-Type", contentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
|
|
||||||
if(progressListener != null) {
|
if(progressListener != null) {
|
||||||
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
||||||
@ -182,8 +286,8 @@ public class StoreApi {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] authNames = new String[] { "test_api_client_id", "test_api_client_secret" };
|
String[] localVarAuthNames = new String[] { "test_api_client_id", "test_api_client_secret" };
|
||||||
return apiClient.buildCall(path, "POST", queryParams, postBody, headerParams, formParams, authNames, progressRequestListener);
|
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -207,8 +311,8 @@ public class StoreApi {
|
|||||||
*/
|
*/
|
||||||
public ApiResponse<Order> placeOrderWithHttpInfo(Order body) throws ApiException {
|
public ApiResponse<Order> placeOrderWithHttpInfo(Order body) throws ApiException {
|
||||||
Call call = placeOrderCall(body, null, null);
|
Call call = placeOrderCall(body, null, null);
|
||||||
Type returnType = new TypeToken<Order>(){}.getType();
|
Type localVarReturnType = new TypeToken<Order>(){}.getType();
|
||||||
return apiClient.execute(call, returnType);
|
return apiClient.execute(call, localVarReturnType);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -229,7 +333,7 @@ public class StoreApi {
|
|||||||
@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() {
|
||||||
@ -241,14 +345,14 @@ public class StoreApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Call call = placeOrderCall(body, progressListener, progressRequestListener);
|
Call call = placeOrderCall(body, progressListener, progressRequestListener);
|
||||||
Type returnType = new TypeToken<Order>(){}.getType();
|
Type localVarReturnType = new TypeToken<Order>(){}.getType();
|
||||||
apiClient.executeAsync(call, returnType, callback);
|
apiClient.executeAsync(call, localVarReturnType, callback);
|
||||||
return call;
|
return call;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Build call for getOrderById */
|
/* Build call for getOrderById */
|
||||||
private Call getOrderByIdCall(String orderId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
private Call getOrderByIdCall(String orderId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||||
Object postBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
// verify the required parameter 'orderId' is set
|
// verify the required parameter 'orderId' is set
|
||||||
if (orderId == null) {
|
if (orderId == null) {
|
||||||
@ -257,26 +361,26 @@ public class StoreApi {
|
|||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/store/order/{orderId}".replaceAll("\\{format\\}","json")
|
String localVarPath = "/store/order/{orderId}".replaceAll("\\{format\\}","json")
|
||||||
.replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString()));
|
.replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString()));
|
||||||
|
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
|
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
|
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
if (accept != null) headerParams.put("Accept", accept);
|
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
headerParams.put("Content-Type", contentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
|
|
||||||
if(progressListener != null) {
|
if(progressListener != null) {
|
||||||
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
||||||
@ -290,8 +394,8 @@ public class StoreApi {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] authNames = new String[] { "test_api_key_query", "test_api_key_header" };
|
String[] localVarAuthNames = new String[] { "test_api_key_query", "test_api_key_header" };
|
||||||
return apiClient.buildCall(path, "GET", queryParams, postBody, headerParams, formParams, authNames, progressRequestListener);
|
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -315,8 +419,8 @@ public class StoreApi {
|
|||||||
*/
|
*/
|
||||||
public ApiResponse<Order> getOrderByIdWithHttpInfo(String orderId) throws ApiException {
|
public ApiResponse<Order> getOrderByIdWithHttpInfo(String orderId) throws ApiException {
|
||||||
Call call = getOrderByIdCall(orderId, null, null);
|
Call call = getOrderByIdCall(orderId, null, null);
|
||||||
Type returnType = new TypeToken<Order>(){}.getType();
|
Type localVarReturnType = new TypeToken<Order>(){}.getType();
|
||||||
return apiClient.execute(call, returnType);
|
return apiClient.execute(call, localVarReturnType);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -337,7 +441,7 @@ public class StoreApi {
|
|||||||
@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() {
|
||||||
@ -349,14 +453,14 @@ public class StoreApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Call call = getOrderByIdCall(orderId, progressListener, progressRequestListener);
|
Call call = getOrderByIdCall(orderId, progressListener, progressRequestListener);
|
||||||
Type returnType = new TypeToken<Order>(){}.getType();
|
Type localVarReturnType = new TypeToken<Order>(){}.getType();
|
||||||
apiClient.executeAsync(call, returnType, callback);
|
apiClient.executeAsync(call, localVarReturnType, callback);
|
||||||
return call;
|
return call;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Build call for deleteOrder */
|
/* Build call for deleteOrder */
|
||||||
private Call deleteOrderCall(String orderId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
private Call deleteOrderCall(String orderId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||||
Object postBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
// verify the required parameter 'orderId' is set
|
// verify the required parameter 'orderId' is set
|
||||||
if (orderId == null) {
|
if (orderId == null) {
|
||||||
@ -365,26 +469,26 @@ public class StoreApi {
|
|||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/store/order/{orderId}".replaceAll("\\{format\\}","json")
|
String localVarPath = "/store/order/{orderId}".replaceAll("\\{format\\}","json")
|
||||||
.replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString()));
|
.replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString()));
|
||||||
|
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
|
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
|
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
if (accept != null) headerParams.put("Accept", accept);
|
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
headerParams.put("Content-Type", contentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
|
|
||||||
if(progressListener != null) {
|
if(progressListener != null) {
|
||||||
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
||||||
@ -398,8 +502,8 @@ public class StoreApi {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] localVarAuthNames = new String[] { };
|
||||||
return apiClient.buildCall(path, "DELETE", queryParams, postBody, headerParams, formParams, authNames, progressRequestListener);
|
return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -442,7 +546,7 @@ public class StoreApi {
|
|||||||
@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() {
|
||||||
|
@ -47,29 +47,29 @@ public class UserApi {
|
|||||||
|
|
||||||
/* Build call for createUser */
|
/* Build call for createUser */
|
||||||
private Call createUserCall(User body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
private Call createUserCall(User body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||||
Object postBody = body;
|
Object localVarPostBody = body;
|
||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/user".replaceAll("\\{format\\}","json");
|
String localVarPath = "/user".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
|
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
|
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
if (accept != null) headerParams.put("Accept", accept);
|
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
headerParams.put("Content-Type", contentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
|
|
||||||
if(progressListener != null) {
|
if(progressListener != null) {
|
||||||
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
||||||
@ -83,8 +83,8 @@ public class UserApi {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] localVarAuthNames = new String[] { };
|
||||||
return apiClient.buildCall(path, "POST", queryParams, postBody, headerParams, formParams, authNames, progressRequestListener);
|
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -127,7 +127,7 @@ public class UserApi {
|
|||||||
@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() {
|
||||||
@ -145,29 +145,29 @@ public class UserApi {
|
|||||||
|
|
||||||
/* Build call for createUsersWithArrayInput */
|
/* Build call for createUsersWithArrayInput */
|
||||||
private Call createUsersWithArrayInputCall(List<User> body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
private Call createUsersWithArrayInputCall(List<User> body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||||
Object postBody = body;
|
Object localVarPostBody = body;
|
||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/user/createWithArray".replaceAll("\\{format\\}","json");
|
String localVarPath = "/user/createWithArray".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
|
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
|
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
if (accept != null) headerParams.put("Accept", accept);
|
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
headerParams.put("Content-Type", contentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
|
|
||||||
if(progressListener != null) {
|
if(progressListener != null) {
|
||||||
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
||||||
@ -181,8 +181,8 @@ public class UserApi {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] localVarAuthNames = new String[] { };
|
||||||
return apiClient.buildCall(path, "POST", queryParams, postBody, headerParams, formParams, authNames, progressRequestListener);
|
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -225,7 +225,7 @@ public class UserApi {
|
|||||||
@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() {
|
||||||
@ -243,29 +243,29 @@ public class UserApi {
|
|||||||
|
|
||||||
/* Build call for createUsersWithListInput */
|
/* Build call for createUsersWithListInput */
|
||||||
private Call createUsersWithListInputCall(List<User> body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
private Call createUsersWithListInputCall(List<User> body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||||
Object postBody = body;
|
Object localVarPostBody = body;
|
||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/user/createWithList".replaceAll("\\{format\\}","json");
|
String localVarPath = "/user/createWithList".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
|
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
|
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
if (accept != null) headerParams.put("Accept", accept);
|
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
headerParams.put("Content-Type", contentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
|
|
||||||
if(progressListener != null) {
|
if(progressListener != null) {
|
||||||
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
||||||
@ -279,8 +279,8 @@ public class UserApi {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] localVarAuthNames = new String[] { };
|
||||||
return apiClient.buildCall(path, "POST", queryParams, postBody, headerParams, formParams, authNames, progressRequestListener);
|
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -323,7 +323,7 @@ public class UserApi {
|
|||||||
@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() {
|
||||||
@ -341,33 +341,33 @@ public class UserApi {
|
|||||||
|
|
||||||
/* Build call for loginUser */
|
/* Build call for loginUser */
|
||||||
private Call loginUserCall(String username, String password, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
private Call loginUserCall(String username, String password, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||||
Object postBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/user/login".replaceAll("\\{format\\}","json");
|
String localVarPath = "/user/login".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
if (username != null)
|
if (username != null)
|
||||||
queryParams.addAll(apiClient.parameterToPairs("", "username", username));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("", "username", username));
|
||||||
if (password != null)
|
if (password != null)
|
||||||
queryParams.addAll(apiClient.parameterToPairs("", "password", password));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("", "password", password));
|
||||||
|
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
|
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
if (accept != null) headerParams.put("Accept", accept);
|
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
headerParams.put("Content-Type", contentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
|
|
||||||
if(progressListener != null) {
|
if(progressListener != null) {
|
||||||
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
||||||
@ -381,8 +381,8 @@ public class UserApi {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] localVarAuthNames = new String[] { };
|
||||||
return apiClient.buildCall(path, "GET", queryParams, postBody, headerParams, formParams, authNames, progressRequestListener);
|
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -408,8 +408,8 @@ public class UserApi {
|
|||||||
*/
|
*/
|
||||||
public ApiResponse<String> loginUserWithHttpInfo(String username, String password) throws ApiException {
|
public ApiResponse<String> loginUserWithHttpInfo(String username, String password) throws ApiException {
|
||||||
Call call = loginUserCall(username, password, null, null);
|
Call call = loginUserCall(username, password, null, null);
|
||||||
Type returnType = new TypeToken<String>(){}.getType();
|
Type localVarReturnType = new TypeToken<String>(){}.getType();
|
||||||
return apiClient.execute(call, returnType);
|
return apiClient.execute(call, localVarReturnType);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -431,7 +431,7 @@ public class UserApi {
|
|||||||
@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() {
|
||||||
@ -443,36 +443,36 @@ public class UserApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Call call = loginUserCall(username, password, progressListener, progressRequestListener);
|
Call call = loginUserCall(username, password, progressListener, progressRequestListener);
|
||||||
Type returnType = new TypeToken<String>(){}.getType();
|
Type localVarReturnType = new TypeToken<String>(){}.getType();
|
||||||
apiClient.executeAsync(call, returnType, callback);
|
apiClient.executeAsync(call, localVarReturnType, callback);
|
||||||
return call;
|
return call;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Build call for logoutUser */
|
/* Build call for logoutUser */
|
||||||
private Call logoutUserCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
private Call logoutUserCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||||
Object postBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/user/logout".replaceAll("\\{format\\}","json");
|
String localVarPath = "/user/logout".replaceAll("\\{format\\}","json");
|
||||||
|
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
|
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
|
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
if (accept != null) headerParams.put("Accept", accept);
|
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
headerParams.put("Content-Type", contentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
|
|
||||||
if(progressListener != null) {
|
if(progressListener != null) {
|
||||||
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
||||||
@ -486,8 +486,8 @@ public class UserApi {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] localVarAuthNames = new String[] { };
|
||||||
return apiClient.buildCall(path, "GET", queryParams, postBody, headerParams, formParams, authNames, progressRequestListener);
|
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -527,7 +527,7 @@ public class UserApi {
|
|||||||
@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() {
|
||||||
@ -545,7 +545,7 @@ public class UserApi {
|
|||||||
|
|
||||||
/* Build call for getUserByName */
|
/* Build call for getUserByName */
|
||||||
private Call getUserByNameCall(String username, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
private Call getUserByNameCall(String username, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||||
Object postBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
// verify the required parameter 'username' is set
|
// verify the required parameter 'username' is set
|
||||||
if (username == null) {
|
if (username == null) {
|
||||||
@ -554,26 +554,26 @@ public class UserApi {
|
|||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/user/{username}".replaceAll("\\{format\\}","json")
|
String localVarPath = "/user/{username}".replaceAll("\\{format\\}","json")
|
||||||
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
|
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
|
||||||
|
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
|
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
|
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
if (accept != null) headerParams.put("Accept", accept);
|
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
headerParams.put("Content-Type", contentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
|
|
||||||
if(progressListener != null) {
|
if(progressListener != null) {
|
||||||
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
||||||
@ -587,8 +587,8 @@ public class UserApi {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] localVarAuthNames = new String[] { };
|
||||||
return apiClient.buildCall(path, "GET", queryParams, postBody, headerParams, formParams, authNames, progressRequestListener);
|
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -612,8 +612,8 @@ public class UserApi {
|
|||||||
*/
|
*/
|
||||||
public ApiResponse<User> getUserByNameWithHttpInfo(String username) throws ApiException {
|
public ApiResponse<User> getUserByNameWithHttpInfo(String username) throws ApiException {
|
||||||
Call call = getUserByNameCall(username, null, null);
|
Call call = getUserByNameCall(username, null, null);
|
||||||
Type returnType = new TypeToken<User>(){}.getType();
|
Type localVarReturnType = new TypeToken<User>(){}.getType();
|
||||||
return apiClient.execute(call, returnType);
|
return apiClient.execute(call, localVarReturnType);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -634,7 +634,7 @@ public class UserApi {
|
|||||||
@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() {
|
||||||
@ -646,14 +646,14 @@ public class UserApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Call call = getUserByNameCall(username, progressListener, progressRequestListener);
|
Call call = getUserByNameCall(username, progressListener, progressRequestListener);
|
||||||
Type returnType = new TypeToken<User>(){}.getType();
|
Type localVarReturnType = new TypeToken<User>(){}.getType();
|
||||||
apiClient.executeAsync(call, returnType, callback);
|
apiClient.executeAsync(call, localVarReturnType, callback);
|
||||||
return call;
|
return call;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Build call for updateUser */
|
/* Build call for updateUser */
|
||||||
private Call updateUserCall(String username, User body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
private Call updateUserCall(String username, User body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||||
Object postBody = body;
|
Object localVarPostBody = body;
|
||||||
|
|
||||||
// verify the required parameter 'username' is set
|
// verify the required parameter 'username' is set
|
||||||
if (username == null) {
|
if (username == null) {
|
||||||
@ -662,26 +662,26 @@ public class UserApi {
|
|||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/user/{username}".replaceAll("\\{format\\}","json")
|
String localVarPath = "/user/{username}".replaceAll("\\{format\\}","json")
|
||||||
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
|
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
|
||||||
|
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
|
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
|
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
if (accept != null) headerParams.put("Accept", accept);
|
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
headerParams.put("Content-Type", contentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
|
|
||||||
if(progressListener != null) {
|
if(progressListener != null) {
|
||||||
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
||||||
@ -695,8 +695,8 @@ public class UserApi {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] localVarAuthNames = new String[] { };
|
||||||
return apiClient.buildCall(path, "PUT", queryParams, postBody, headerParams, formParams, authNames, progressRequestListener);
|
return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -742,7 +742,7 @@ public class UserApi {
|
|||||||
@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() {
|
||||||
@ -760,7 +760,7 @@ public class UserApi {
|
|||||||
|
|
||||||
/* Build call for deleteUser */
|
/* Build call for deleteUser */
|
||||||
private Call deleteUserCall(String username, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
private Call deleteUserCall(String username, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||||
Object postBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
// verify the required parameter 'username' is set
|
// verify the required parameter 'username' is set
|
||||||
if (username == null) {
|
if (username == null) {
|
||||||
@ -769,26 +769,26 @@ public class UserApi {
|
|||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/user/{username}".replaceAll("\\{format\\}","json")
|
String localVarPath = "/user/{username}".replaceAll("\\{format\\}","json")
|
||||||
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
|
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
|
||||||
|
|
||||||
List<Pair> queryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
|
|
||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
|
|
||||||
Map<String, Object> formParams = new HashMap<String, Object>();
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
final String[] accepts = {
|
final String[] localVarAccepts = {
|
||||||
"application/json", "application/xml"
|
"application/json", "application/xml"
|
||||||
};
|
};
|
||||||
final String accept = apiClient.selectHeaderAccept(accepts);
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
if (accept != null) headerParams.put("Accept", accept);
|
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
|
||||||
|
|
||||||
final String[] contentTypes = {
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
};
|
};
|
||||||
final String contentType = apiClient.selectHeaderContentType(contentTypes);
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
headerParams.put("Content-Type", contentType);
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
|
|
||||||
if(progressListener != null) {
|
if(progressListener != null) {
|
||||||
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
|
||||||
@ -802,8 +802,8 @@ public class UserApi {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] localVarAuthNames = new String[] { };
|
||||||
return apiClient.buildCall(path, "DELETE", queryParams, postBody, headerParams, formParams, authNames, progressRequestListener);
|
return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -846,7 +846,7 @@ public class UserApi {
|
|||||||
@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() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user