// Path: src/main/ru/bpmink/util/Constants.java
// public static final String CLOSE_BRACKET = "]";
// 
// Path: src/main/ru/bpmink/util/Constants.java
// public static final String COLON = ":";
// 
// Path: src/main/ru/bpmink/util/Constants.java
// public static final String OPEN_BRACKET = "[";
// 
// Path: src/main/ru/bpmink/util/Constants.java
// public static final String SPACE = " ";


import com.google.common.collect.Lists;
import com.google.gson.annotations.SerializedName;
import java.util.List;
import static ru.bpmink.util.Constants.CLOSE_BRACKET;
import static ru.bpmink.util.Constants.COLON;
import static ru.bpmink.util.Constants.OPEN_BRACKET;
import static ru.bpmink.util.Constants.SPACE;
package ru.bpmink.bpm.model.common;




/**
 * Thrown during an attempt to access {@link ru.bpmink.bpm.model.common.RestRootEntity#getPayload()}
 * if the rest-api call was unsuccessful.
 * This exception contains all information about server-side exceptional event.
 */

@SuppressWarnings("unused")
public final class RestException extends RuntimeException {

    //The status of the previous API call.
    @SerializedName("status")
    private String status;

    //The classname associated with the exception.
    @SerializedName("exceptionType")
    private String exceptionType;

    //Message ID of the exception.
    @SerializedName("errorNumber")
    private String errorNumber;

    //Message text of the exception.
    @SerializedName("errorMessage")
    private String errorMessage;

    //Message text parameters of the exception.
    @SerializedName("errorMessageParameters")
    private List<String> errorMessageParameters = Lists.newArrayList();

    //The stacktrace associated with the exception. Note that this will be omitted unless the
    //"server-stacktrace-enabled" property is enabled in the server's 100Custom.xml file.
    @SerializedName("programmersDetails")
    private Object programmersDetails;

    //Prior responses. Set if a bulk command was used.
    @SerializedName("responses")
    private Object responses;

    RestException() {
    }

    @Override
    @SuppressWarnings("StringBufferReplaceableByString")
    public String getMessage() {
        StringBuilder exceptionBuilder = new StringBuilder();
        exceptionBuilder.append(this.getClass().getName());
        exceptionBuilder.append(COLON).append(SPACE);
        exceptionBuilder.append(errorMessage).append(SPACE);
        exceptionBuilder.append(OPEN_BRACKET).append("Root cause");
// Path: src/main/ru/bpmink/util/Constants.java
// public static final String CLOSE_BRACKET = "]";
// 
// Path: src/main/ru/bpmink/util/Constants.java
// public static final String COLON = ":";
// 
// Path: src/main/ru/bpmink/util/Constants.java
// public static final String OPEN_BRACKET = "[";
// 
// Path: src/main/ru/bpmink/util/Constants.java
// public static final String SPACE = " ";


// Path: src/main/ru/bpmink/bpm/model/common/RestException.java
import com.google.common.collect.Lists;
import com.google.gson.annotations.SerializedName;
import java.util.List;
import static ru.bpmink.util.Constants.CLOSE_BRACKET;
import static ru.bpmink.util.Constants.COLON;
import static ru.bpmink.util.Constants.OPEN_BRACKET;
import static ru.bpmink.util.Constants.SPACE;

package ru.bpmink.bpm.model.common;




/**
 * Thrown during an attempt to access {@link ru.bpmink.bpm.model.common.RestRootEntity#getPayload()}
 * if the rest-api call was unsuccessful.
 * This exception contains all information about server-side exceptional event.
 */

@SuppressWarnings("unused")
public final class RestException extends RuntimeException {

    //The status of the previous API call.
    @SerializedName("status")
    private String status;

    //The classname associated with the exception.
    @SerializedName("exceptionType")
    private String exceptionType;

    //Message ID of the exception.
    @SerializedName("errorNumber")
    private String errorNumber;

    //Message text of the exception.
    @SerializedName("errorMessage")
    private String errorMessage;

    //Message text parameters of the exception.
    @SerializedName("errorMessageParameters")
    private List<String> errorMessageParameters = Lists.newArrayList();

    //The stacktrace associated with the exception. Note that this will be omitted unless the
    //"server-stacktrace-enabled" property is enabled in the server's 100Custom.xml file.
    @SerializedName("programmersDetails")
    private Object programmersDetails;

    //Prior responses. Set if a bulk command was used.
    @SerializedName("responses")
    private Object responses;

    RestException() {
    }

    @Override
    @SuppressWarnings("StringBufferReplaceableByString")
    public String getMessage() {
        StringBuilder exceptionBuilder = new StringBuilder();
        exceptionBuilder.append(this.getClass().getName());
        exceptionBuilder.append(COLON).append(SPACE);
        exceptionBuilder.append(errorMessage).append(SPACE);
        exceptionBuilder.append(OPEN_BRACKET).append("Root cause");
        exceptionBuilder.append(COLON).append(SPACE).append(exceptionType);