admin
2024-10-16 bd885c7015446c6c0495d3299ef64068a4c9b30e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package cn.jpush.api.report;
 
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;
 
import com.google.gson.annotations.Expose;
import com.google.gson.reflect.TypeToken;
 
import cn.jiguang.common.resp.BaseResult;
import cn.jiguang.common.resp.ResponseWrapper;
 
public class ReceivedsResult extends BaseResult {
    private static final Type RECEIVED_TYPE = new TypeToken<List<Received>>() {}.getType();
    private static final long serialVersionUID = 1761456104618847304L;
 
    @Expose
    public List<Received> received_list = new ArrayList<Received>();
 
 
    public static class Received {
        @Expose
        public long msg_id;
        @Expose
        public int android_pns_sent;
        @Expose
        public int android_pns_received;
        @Expose
        public int quickapp_jpush_received;
        @Expose
        public int quickapp_pns_sent;
        @Expose
        public int android_received;
        @Expose
        public int ios_apns_sent;
        @Expose
        public int ios_apns_received;
        @Expose
        public int ios_msg_received;
        @Expose
        public int wp_mpns_sent;
        @Expose
        public int jpush_received;
    }
 
    static ReceivedsResult fromResponse(ResponseWrapper responseWrapper) {
        ReceivedsResult result = new ReceivedsResult();
        if (responseWrapper.isServerResponse()) {
            result.received_list = _gson.fromJson(responseWrapper.responseContent, RECEIVED_TYPE);
        }
 
        result.setResponseWrapper(responseWrapper);
        return result;
    }
 
}