mirror of
https://github.com/jlengrand/openapi-generator.git
synced 2026-05-14 08:31:19 +00:00
48 lines
1015 B
Plaintext
48 lines
1015 B
Plaintext
package {{invokerPackage}};
|
|
|
|
import java.util.Map;
|
|
import java.util.List;
|
|
|
|
public class ApiException extends Exception {
|
|
private int code = 0;
|
|
private String message = null;
|
|
private Map<String, List<String>> responseHeaders = null;
|
|
private String responseBody = null;
|
|
|
|
public ApiException() {}
|
|
|
|
public ApiException(int code, String message) {
|
|
this.code = code;
|
|
this.message = message;
|
|
}
|
|
|
|
public ApiException(int code, String message, Map<String, List<String>> responseHeaders, String responseBody) {
|
|
this.code = code;
|
|
this.message = message;
|
|
this.responseHeaders = responseHeaders;
|
|
this.responseBody = responseBody;
|
|
}
|
|
|
|
public int getCode() {
|
|
return code;
|
|
}
|
|
|
|
public String getMessage() {
|
|
return message;
|
|
}
|
|
|
|
/**
|
|
* Get the HTTP response headers.
|
|
*/
|
|
public Map<String, List<String>> getResponseHeaders() {
|
|
return responseHeaders;
|
|
}
|
|
|
|
/**
|
|
* Get the HTTP response body.
|
|
*/
|
|
public String getResponseBody() {
|
|
return responseBody;
|
|
}
|
|
}
|