|
10 | 10 | import java.util.List; |
11 | 11 |
|
12 | 12 | public class MessagesResult extends BaseResult { |
13 | | - private static final Type MESSAGE_TYPE = new TypeToken<List<Message>>(){}.getType(); |
14 | | - |
15 | | - @Expose public List<Message> messages = new ArrayList<Message>(); |
16 | | - |
17 | | - public static class Message { |
18 | | - @Expose public long msg_id; |
19 | | - @Expose public Android android; |
20 | | - @Expose public Ios ios; |
21 | | - @Expose public Winphone winphone; |
22 | | - } |
23 | | - |
| 13 | + private static final Type MESSAGE_TYPE = new TypeToken<List<Message>>() {}.getType(); |
| 14 | + |
| 15 | + @Expose |
| 16 | + public List<Message> messages = new ArrayList<Message>(); |
| 17 | + |
| 18 | + public static class Message { |
| 19 | + @Expose |
| 20 | + public long msg_id; |
| 21 | + @Expose |
| 22 | + public Android android; |
| 23 | + @Expose |
| 24 | + public Ios ios; |
| 25 | + @Expose |
| 26 | + public Winphone winphone; |
| 27 | + } |
| 28 | + |
24 | 29 | public static class Android { |
25 | | - @Expose public int received; |
26 | | - @Expose public int target; |
27 | | - @Expose public int online_push; |
28 | | - @Expose public int click; |
29 | | - @Expose public int msg_click; |
| 30 | + @Expose |
| 31 | + public int received; |
| 32 | + @Expose |
| 33 | + public int target; |
| 34 | + @Expose |
| 35 | + public int online_push; |
| 36 | + @Expose |
| 37 | + public int click; |
| 38 | + @Expose |
| 39 | + public int msg_click; |
30 | 40 | } |
31 | | - |
| 41 | + |
32 | 42 | public static class Ios { |
33 | | - @Expose public int apns_sent; |
34 | | - @Expose public int apns_target; |
35 | | - @Expose public int click; |
36 | | - @Expose public int target; |
37 | | - @Expose public int received; |
38 | | - @Expose public int msg_click; |
| 43 | + @Expose |
| 44 | + public int apns_sent; |
| 45 | + @Expose |
| 46 | + public int apns_target; |
| 47 | + @Expose |
| 48 | + public int click; |
| 49 | + @Expose |
| 50 | + public int target; |
| 51 | + @Expose |
| 52 | + public int received; |
| 53 | + @Expose |
| 54 | + public int msg_click; |
39 | 55 | } |
40 | 56 |
|
41 | 57 | public static class Winphone { |
42 | | - @Expose public int mpns_target; |
43 | | - @Expose public int mpns_sent; |
44 | | - @Expose public int click; |
| 58 | + @Expose |
| 59 | + public int mpns_target; |
| 60 | + @Expose |
| 61 | + public int mpns_sent; |
| 62 | + @Expose |
| 63 | + public int click; |
45 | 64 | } |
46 | | - |
47 | | - static MessagesResult fromResponse(ResponseWrapper responseWrapper) { |
| 65 | + |
| 66 | + static MessagesResult fromResponse(ResponseWrapper responseWrapper) { |
48 | 67 | MessagesResult result = new MessagesResult(); |
49 | 68 | if (responseWrapper.isServerResponse()) { |
50 | 69 | result.messages = _gson.fromJson(responseWrapper.responseContent, MESSAGE_TYPE); |
51 | 70 | } |
52 | | - |
| 71 | + |
53 | 72 | result.setResponseWrapper(responseWrapper); |
54 | 73 | return result; |
55 | | - } |
56 | | - |
| 74 | + } |
| 75 | + |
57 | 76 | } |
0 commit comments