package com.baidu.xasset.client.base;

/**
 * @author AnJiabin <anjiabin@zhengzai.tv>
 * @version V1.0
 * @Description: TODO
 * @class: BaseDef
 * @Package com.baidu.xasset.client.base
 * @Copyright: LightNet @ Copyright (c) 2022
 * @date 2022/8/17 10:59
 */
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

public class BaseDef {
    public static final int ERRNOSUCC = 0;
    public static final int MAXLIMIT = 50;

    public BaseDef() {
    }

    public static class ListAddrResp<T> {
        public long requestId;
        public int errNo;
        public String errMsg;
        public T list;

        public ListAddrResp(long requestId, int errNo, String errMsg, T list) {
            this.requestId = requestId;
            this.errNo = errNo;
            this.errMsg = errMsg;
            this.list = list;
        }
    }

    public static class ListPageResp<T> {
        public long requestId;
        public int errNo;
        public String errMsg;
        public T list;
        public int totalCnt;

        public ListPageResp(long requestId, int errNo, String errMsg, T list, int totalCnt) {
            this.requestId = requestId;
            this.errNo = errNo;
            this.errMsg = errMsg;
            this.list = list;
            this.totalCnt = totalCnt;
        }

        public long getRequestId() {
            return requestId;
        }

        public void setRequestId(long requestId) {
            this.requestId = requestId;
        }

        public int getErrNo() {
            return errNo;
        }

        public void setErrNo(int errNo) {
            this.errNo = errNo;
        }

        public String getErrMsg() {
            return errMsg;
        }

        public void setErrMsg(String errMsg) {
            this.errMsg = errMsg;
        }

        public T getList() {
            return list;
        }

        public void setList(T list) {
            this.list = list;
        }

        public int getTotalCnt() {
            return totalCnt;
        }

        public void setTotalCnt(int totalCnt) {
            this.totalCnt = totalCnt;
        }
    }

    public static class ListCursorResp<T> {
        public long requestId;
        public int errNo;
        public String errMsg;
        public T list;
        public int hasMore;
        public String cursor;

        public ListCursorResp(long requestId, int errNo, String errMsg, T list, int hasMore, String cursor) {
            this.requestId = requestId;
            this.errNo = errNo;
            this.errMsg = errMsg;
            this.list = list;
            this.hasMore = hasMore;
            this.cursor = cursor;
        }

        public long getRequestId() {
            return requestId;
        }

        public void setRequestId(long requestId) {
            this.requestId = requestId;
        }

        public int getErrNo() {
            return errNo;
        }

        public void setErrNo(int errNo) {
            this.errNo = errNo;
        }

        public String getErrMsg() {
            return errMsg;
        }

        public void setErrMsg(String errMsg) {
            this.errMsg = errMsg;
        }

        public T getList() {
            return list;
        }

        public void setList(T list) {
            this.list = list;
        }

        public int getHasMore() {
            return hasMore;
        }

        public void setHasMore(int hasMore) {
            this.hasMore = hasMore;
        }

        public String getCursor() {
            return cursor;
        }

        public void setCursor(String cursor) {
            this.cursor = cursor;
        }
    }

    public static class Resp<T> {
        public T apiResp;
        public RequestRes res;

        public Resp(T resp, RequestRes res) {
            this.apiResp = resp;
            this.res = res;
        }
    }

    public static class BaseResp {
        public long requestId;
        public int errNo;
        public String errMsg;

        public BaseResp(long requestId, int errNo, String errMsg) {
            this.requestId = requestId;
            this.errNo = errNo;
            this.errMsg = errMsg;
        }
    }

    public static class RequestRes {
        public int httpCode;
        public String reqUrl;
        public String traceId;
        public String body;

        RequestRes(int httpCode, String reqUrl, String traceId, String body) {
            this.httpCode = httpCode;
            this.reqUrl = reqUrl;
            this.traceId = traceId;
            this.body = body;
        }
    }
}
