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

com.exaroton.api.APIResponse Maven / Gradle / Ivy

There is a newer version: 1.5.0
Show newest version
package com.exaroton.api;

public class APIResponse {

    /**
     * Request success
     */
    private final boolean success;

    /**
     * Error message
     */
    private final String error;

    /**
     * Response data
     */
    private final Datatype data;

    /**
     * create an APIResponse
     * @param success request success
     * @param error error message
     * @param data response data
     */
    public APIResponse(boolean success, String error, Datatype data) {
        this.success = success;
        this.error = error;
        this.data = data;
    }


    /**
     * @return request success
     */
    public boolean isSuccess() {
        return success;
    }

    /**
     * @return error message
     */
    public String getError() {
        return error;
    }

    /**
     * @return response data
     */
    public Datatype getData() {
        return data;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy