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

com.yunpian.sdk.model.Result Maven / Gradle / Ivy

/**
 * 
 */
package com.yunpian.sdk.model;

import com.yunpian.sdk.constant.Code;
import com.yunpian.sdk.util.JsonUtil;

/**
 * Api返回格式
 * 
 * @author dzh
 * @date Nov 24, 2016 7:29:08 PM
 * @since 1.2.0
 */
public class Result {

    private Integer code = Code.OK;
    private String msg;
    private String detail;

    private Throwable e;

    private T data;

    public T getData() {
        return data;
    }

    public String getDetail() {
        return detail;
    }

    public Result setDetail(String detail) {
        this.detail = detail;
        return this;
    }

    public Result setData(T data) {
        this.data = data;
        return this;
    }

    public Integer getCode() {
        return code;
    }

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

    public String getMsg() {
        return msg;
    }

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

    public Throwable getThrowable() {
        return e;
    }

    public Result setThrowable(Throwable e) {
        this.e = e;
        return this;
    }

    @Override
    public String toString() {
        return JsonUtil.toJson(this);
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy