All Downloads are FREE. Search and download functionalities are using the official Maven repository.

Java.apiException.mustache Maven / Gradle / Ivy

There is a newer version: 3.0.0-rc1
Show newest version
package {{invokerPackage}};

import java.util.Map;
import java.util.List;

{{>generatedAnnotation}}
public class ApiException extends Exception {
  private int code = 0;
  private String message = null;
  private Map> 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> 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> getResponseHeaders() {
    return responseHeaders;
  }

  /**
   * Get the HTTP response body.
   */
  public String getResponseBody() {
    return responseBody;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy