package   cn.wise.sc.energy.power.plant.business.utils;


/**
 * @description: opentsdb返回码提示信息
 * @author: qh
 * @create: 2020-05-07 09:47
 **/
public enum ResponseStateMsg {

    SUCCESS(200,"The request completed successfully"),
    SUCCESS_NOT_RETURN(204,"The server has completed the request successfully but is not returning content in the body. This is primarily used for storing data points as it is not necessary to return data to caller"),
    API_MIGRATED_OR_FORWARDED(301,"The server has completed the request successfully but is not returning content in the body. This is primarily used for storing data points as it is not necessary to return data to caller"),
    PARAMETER_ERROR(400,"Information provided by the API user, via a query string or content data, was in error or missing. This will usually include information in the error body about what parameter caused the issue. Correct the data and try again"),
    ENDPOINT_OR_FILE_NOT_FOUND(404,"The requested endpoint or file was not found. This is usually related to the static file endpoint."),
    REQUEST_NOT_ALLOWED(405,"The requested verb or method was not allowed. Please see the documentation for the endpoint you are attempting to access"),
    FORMAT_ERROR(406,"The request could not generate a response in the format specified. For example, if you ask for a PNG file of the logs endpoing, you will get a 406 response since log entries cannot be converted to a PNG image (easily)"),
    REQUEST_TIME_OUT(408,"The request has timed out. This may be due to a timeout fetching data from the underlying storage system or other issues"),
    REQUEST_BODY_TOO_LARGE(413,"The results returned from a query may be too large for the server's buffers to handle. This can happen if you request a lot of raw data from OpenTSDB. In such cases break your query up into smaller queries and run each individually"),
    INTERNAL_ERROR(500,"An internal error occured within OpenTSDB. Make sure all of the systems OpenTSDB depends on are accessible and check the bug list for issues"),
    REQUEST_FEATURE_NOT_IMPLEMENTED(501,"The requested feature has not been implemented yet. This may appear with formatters or when calling methods that depend on plugins"),
    REQUEST_CONNECT_OVERLOAD(503,"A temporary overload has occurred. Check with other users/applications that are interacting with OpenTSDB and determine if you need to reduce requests or scale your system.");

    private Integer code;
    private String msg;

    ResponseStateMsg(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
