package org.tio.sitexxx.service.service.jpush.huawei.response;

import com.alibaba.fastjson.JSONArray;

/**
 * <pre>
 *    @author : vagrancy
 *    e-mail : 18050829067@163.com
 *    time   : 2025-02-21 10:58
 *    desc   :
 * </pre>
 */
public class TopicSendResponse extends SendResponse {
    private final Integer failureCount;
    private final Integer successCount;
    private final JSONArray errors;

    public Integer getFailureCount() {
        return failureCount;
    }

    public Integer getSuccessCount() {
        return successCount;
    }

    public JSONArray getErrors() {
        return errors;
    }

    private TopicSendResponse(String code, String msg, String requestId, Integer failureCount, Integer successCount, JSONArray errors) {
        super(code,msg,requestId);
        this.failureCount = failureCount;
        this.successCount = successCount;
        this.errors = errors;
    }

    public static TopicSendResponse fromCode(String code, String msg, String requestId,Integer failureCount,Integer successCount,JSONArray errors ) {
        return new TopicSendResponse(code, msg, requestId,failureCount,successCount,errors);
    }
}
