Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 99751fb

Browse files
author
归邪
committed
aliyun-java-sdk-push
1 parent 1f8a1ce commit 99751fb

File tree

8 files changed

+319
-1
lines changed

8 files changed

+319
-1
lines changed

aliyun-java-sdk-push/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<groupId>com.aliyun</groupId>
44
<artifactId>aliyun-java-sdk-push</artifactId>
55
<packaging>jar</packaging>
6-
<version>2.2.1</version>
6+
<version>2.2.2</version>
77
<name>aliyun-java-sdk-push</name>
88
<url>http://www.aliyun.com</url>
99
<description>Aliyun Open API SDK for Java
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
package com.aliyuncs.push.model.v20150827;
20+
21+
import com.aliyuncs.RpcAcsRequest;
22+
23+
/**
24+
* @author auto create
25+
* @version
26+
*/
27+
public class ListDevicePushRecordsRequest extends RpcAcsRequest<ListDevicePushRecordsResponse> {
28+
29+
public ListDevicePushRecordsRequest() {
30+
super("Push", "2015-08-27", "ListDevicePushRecords");
31+
}
32+
33+
private Long appKey;
34+
35+
private String deviceId;
36+
37+
private Integer page;
38+
39+
private Integer pageSize;
40+
41+
public Long getAppKey() {
42+
return this.appKey;
43+
}
44+
45+
public void setAppKey(Long appKey) {
46+
this.appKey = appKey;
47+
putQueryParameter("AppKey", appKey);
48+
}
49+
50+
public String getDeviceId() {
51+
return this.deviceId;
52+
}
53+
54+
public void setDeviceId(String deviceId) {
55+
this.deviceId = deviceId;
56+
putQueryParameter("DeviceId", deviceId);
57+
}
58+
59+
public Integer getPage() {
60+
return this.page;
61+
}
62+
63+
public void setPage(Integer page) {
64+
this.page = page;
65+
putQueryParameter("Page", page);
66+
}
67+
68+
public Integer getPageSize() {
69+
return this.pageSize;
70+
}
71+
72+
public void setPageSize(Integer pageSize) {
73+
this.pageSize = pageSize;
74+
putQueryParameter("PageSize", pageSize);
75+
}
76+
77+
@Override
78+
public Class<ListDevicePushRecordsResponse> getResponseClass() {
79+
return ListDevicePushRecordsResponse.class;
80+
}
81+
82+
}
Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
package com.aliyuncs.push.model.v20150827;
20+
21+
import java.util.List;
22+
import com.aliyuncs.AcsResponse;
23+
import com.aliyuncs.push.transform.v20150827.ListDevicePushRecordsResponseUnmarshaller;
24+
import com.aliyuncs.transform.UnmarshallerContext;
25+
26+
/**
27+
* @author auto create
28+
* @version
29+
*/
30+
public class ListDevicePushRecordsResponse extends AcsResponse {
31+
32+
private String requestId;
33+
34+
private Integer total;
35+
36+
private Integer pageSize;
37+
38+
private Integer page;
39+
40+
private List<DevicePushStat> messageList;
41+
42+
public String getRequestId() {
43+
return this.requestId;
44+
}
45+
46+
public void setRequestId(String requestId) {
47+
this.requestId = requestId;
48+
}
49+
50+
public Integer getTotal() {
51+
return this.total;
52+
}
53+
54+
public void setTotal(Integer total) {
55+
this.total = total;
56+
}
57+
58+
public Integer getPageSize() {
59+
return this.pageSize;
60+
}
61+
62+
public void setPageSize(Integer pageSize) {
63+
this.pageSize = pageSize;
64+
}
65+
66+
public Integer getPage() {
67+
return this.page;
68+
}
69+
70+
public void setPage(Integer page) {
71+
this.page = page;
72+
}
73+
74+
public List<DevicePushStat> getMessageList() {
75+
return this.messageList;
76+
}
77+
78+
public void setMessageList(List<DevicePushStat> messageList) {
79+
this.messageList = messageList;
80+
}
81+
82+
public static class DevicePushStat {
83+
84+
private String messageId;
85+
86+
private String pushStatus;
87+
88+
private String deviceStatusWhenPush;
89+
90+
private String pushTime;
91+
92+
private String lastModifyTime;
93+
94+
public String getMessageId() {
95+
return this.messageId;
96+
}
97+
98+
public void setMessageId(String messageId) {
99+
this.messageId = messageId;
100+
}
101+
102+
public String getPushStatus() {
103+
return this.pushStatus;
104+
}
105+
106+
public void setPushStatus(String pushStatus) {
107+
this.pushStatus = pushStatus;
108+
}
109+
110+
public String getDeviceStatusWhenPush() {
111+
return this.deviceStatusWhenPush;
112+
}
113+
114+
public void setDeviceStatusWhenPush(String deviceStatusWhenPush) {
115+
this.deviceStatusWhenPush = deviceStatusWhenPush;
116+
}
117+
118+
public String getPushTime() {
119+
return this.pushTime;
120+
}
121+
122+
public void setPushTime(String pushTime) {
123+
this.pushTime = pushTime;
124+
}
125+
126+
public String getLastModifyTime() {
127+
return this.lastModifyTime;
128+
}
129+
130+
public void setLastModifyTime(String lastModifyTime) {
131+
this.lastModifyTime = lastModifyTime;
132+
}
133+
}
134+
135+
@Override
136+
public ListDevicePushRecordsResponse getInstance(UnmarshallerContext context) {
137+
return ListDevicePushRecordsResponseUnmarshaller.unmarshall(this, context);
138+
}
139+
}

aliyun-java-sdk-push/src/main/java/com/aliyuncs/push/model/v20150827/QueryAppPushStatResponse.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ public static class AppPushStat {
5757

5858
private Long receivedCount;
5959

60+
private Long openedCount;
61+
62+
private Long deletedCount;
63+
6064
public String getTime() {
6165
return this.time;
6266
}
@@ -80,6 +84,22 @@ public Long getReceivedCount() {
8084
public void setReceivedCount(Long receivedCount) {
8185
this.receivedCount = receivedCount;
8286
}
87+
88+
public Long getOpenedCount() {
89+
return this.openedCount;
90+
}
91+
92+
public void setOpenedCount(Long openedCount) {
93+
this.openedCount = openedCount;
94+
}
95+
96+
public Long getDeletedCount() {
97+
return this.deletedCount;
98+
}
99+
100+
public void setDeletedCount(Long deletedCount) {
101+
this.deletedCount = deletedCount;
102+
}
83103
}
84104

85105
@Override

aliyun-java-sdk-push/src/main/java/com/aliyuncs/push/model/v20150827/QueryPushStatResponse.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ public static class PushStat {
5757

5858
private Long receivedCount;
5959

60+
private Long openedCount;
61+
62+
private Long deletedCount;
63+
6064
public String getMessageId() {
6165
return this.messageId;
6266
}
@@ -80,6 +84,22 @@ public Long getReceivedCount() {
8084
public void setReceivedCount(Long receivedCount) {
8185
this.receivedCount = receivedCount;
8286
}
87+
88+
public Long getOpenedCount() {
89+
return this.openedCount;
90+
}
91+
92+
public void setOpenedCount(Long openedCount) {
93+
this.openedCount = openedCount;
94+
}
95+
96+
public Long getDeletedCount() {
97+
return this.deletedCount;
98+
}
99+
100+
public void setDeletedCount(Long deletedCount) {
101+
this.deletedCount = deletedCount;
102+
}
83103
}
84104

85105
@Override
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
package com.aliyuncs.push.transform.v20150827;
20+
21+
import java.util.ArrayList;
22+
import java.util.List;
23+
24+
import com.aliyuncs.push.model.v20150827.ListDevicePushRecordsResponse;
25+
import com.aliyuncs.push.model.v20150827.ListDevicePushRecordsResponse.DevicePushStat;
26+
import com.aliyuncs.transform.UnmarshallerContext;
27+
28+
29+
public class ListDevicePushRecordsResponseUnmarshaller {
30+
31+
public static ListDevicePushRecordsResponse unmarshall(ListDevicePushRecordsResponse listDevicePushRecordsResponse, UnmarshallerContext context) {
32+
33+
listDevicePushRecordsResponse.setRequestId(context.stringValue("ListDevicePushRecordsResponse.RequestId"));
34+
listDevicePushRecordsResponse.setTotal(context.integerValue("ListDevicePushRecordsResponse.Total"));
35+
listDevicePushRecordsResponse.setPageSize(context.integerValue("ListDevicePushRecordsResponse.PageSize"));
36+
listDevicePushRecordsResponse.setPage(context.integerValue("ListDevicePushRecordsResponse.Page"));
37+
38+
List<DevicePushStat> messageList = new ArrayList<DevicePushStat>();
39+
for (int i = 0; i < context.lengthValue("ListDevicePushRecordsResponse.MessageList.Length"); i++) {
40+
DevicePushStat devicePushStat = new DevicePushStat();
41+
devicePushStat.setMessageId(context.stringValue("ListDevicePushRecordsResponse.MessageList["+ i +"].MessageId"));
42+
devicePushStat.setPushStatus(context.stringValue("ListDevicePushRecordsResponse.MessageList["+ i +"].PushStatus"));
43+
devicePushStat.setDeviceStatusWhenPush(context.stringValue("ListDevicePushRecordsResponse.MessageList["+ i +"].DeviceStatusWhenPush"));
44+
devicePushStat.setPushTime(context.stringValue("ListDevicePushRecordsResponse.MessageList["+ i +"].PushTime"));
45+
devicePushStat.setLastModifyTime(context.stringValue("ListDevicePushRecordsResponse.MessageList["+ i +"].LastModifyTime"));
46+
47+
messageList.add(devicePushStat);
48+
}
49+
listDevicePushRecordsResponse.setMessageList(messageList);
50+
51+
return listDevicePushRecordsResponse;
52+
}
53+
}

aliyun-java-sdk-push/src/main/java/com/aliyuncs/push/transform/v20150827/QueryAppPushStatResponseUnmarshaller.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ public static QueryAppPushStatResponse unmarshall(QueryAppPushStatResponse query
3838
appPushStat.setTime(context.stringValue("QueryAppPushStatResponse.AppPushStats["+ i +"].Time"));
3939
appPushStat.setSentCount(context.longValue("QueryAppPushStatResponse.AppPushStats["+ i +"].SentCount"));
4040
appPushStat.setReceivedCount(context.longValue("QueryAppPushStatResponse.AppPushStats["+ i +"].ReceivedCount"));
41+
appPushStat.setOpenedCount(context.longValue("QueryAppPushStatResponse.AppPushStats["+ i +"].OpenedCount"));
42+
appPushStat.setDeletedCount(context.longValue("QueryAppPushStatResponse.AppPushStats["+ i +"].DeletedCount"));
4143

4244
appPushStats.add(appPushStat);
4345
}

aliyun-java-sdk-push/src/main/java/com/aliyuncs/push/transform/v20150827/QueryPushStatResponseUnmarshaller.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ public static QueryPushStatResponse unmarshall(QueryPushStatResponse queryPushSt
3838
pushStat.setMessageId(context.stringValue("QueryPushStatResponse.PushStats["+ i +"].MessageId"));
3939
pushStat.setSentCount(context.longValue("QueryPushStatResponse.PushStats["+ i +"].SentCount"));
4040
pushStat.setReceivedCount(context.longValue("QueryPushStatResponse.PushStats["+ i +"].ReceivedCount"));
41+
pushStat.setOpenedCount(context.longValue("QueryPushStatResponse.PushStats["+ i +"].OpenedCount"));
42+
pushStat.setDeletedCount(context.longValue("QueryPushStatResponse.PushStats["+ i +"].DeletedCount"));
4143

4244
pushStats.add(pushStat);
4345
}

0 commit comments

Comments
 (0)