NIMSDK-AOS 10.4.0-beta
载入中...
搜索中...
未找到
QChatUpdateSystemNotificationParam.java
浏览该文件的文档.
1package com.netease.nimlib.sdk.qchat.param;
2
3import androidx.annotation.NonNull;
4
5import com.netease.nimlib.sdk.qchat.enums.QChatSystemNotificationType;
6
7import java.util.Map;
8
9/**
10 * "更新系统通知"接口入参
11 */
13 /**
14 * 更新操作通用参数,设置该操作相关的附加字段,设置该操作引发的推送内容,必填
15 */
16 @NonNull
17 private final QChatUpdateParam updateParam;
18 /**
19 * 服务端生成的消息id,全局唯一,必填
20 */
21 @NonNull
22 private final Long msgIdServer;
23 /**
24 * 通知类型
25 */
26 @NonNull
27 private final QChatSystemNotificationType type;
28 /**
29 * 通知内容
30 */
31 private String body;
32 /**
33 * 通知扩展,SDK会转成json字符串使用
34 */
35 private Map<String, Object> extension;
36 /**
37 * 状态,只能设置自定义(status>= 10000)
38 */
39 private Integer status;
40
41 /**
42 * 只能更新isPersistEnable为true的通知
43 *
44 * @param updateParam 更新操作通用参数
45 * @param msgIdServer 通知id,全局唯一
46 * @param type 通知类型
47 */
48 public QChatUpdateSystemNotificationParam(@NonNull QChatUpdateParam updateParam, long msgIdServer,QChatSystemNotificationType type) {
49 this.updateParam = updateParam;
50 this.msgIdServer = msgIdServer;
51 this.type = type;
52 }
53
54 /**
55 * 获取更新操作通用参数
56 */
57 @NonNull
59 return updateParam;
60 }
61
62 /**
63 * 获取服务端生成的消息id
64 */
65 @NonNull
66 public Long getMsgIdServer() {
67 return msgIdServer;
68 }
69
70 /**
71 * 获取通知类型
72 */
73 @NonNull
75 return type;
76 }
77
78 /**
79 * 获取通知内容
80 */
81 public String getBody() {
82 return body;
83 }
84
85 /**
86 * 设置通知内容
87 * @param body
88 */
89 public void setBody(String body) {
90 this.body = body;
91 }
92
93 /**
94 * 获取通知扩展
95 */
96 public Map<String, Object> getExtension() {
97 return extension;
98 }
99
100 /**
101 * 设置通知扩展
102 * @param extension
103 */
104 public void setExtension(Map<String, Object> extension) {
105 this.extension = extension;
106 }
107
108 /**
109 * 获取状态
110 */
111 public Integer getStatus() {
112 return status;
113 }
114
115 /**
116 * 设置状态,只能设置成自定义的状态(status>= 10000),否则提示414参数错误
117 * @param status
118 */
119 public void setStatus(Integer status) {
120 this.status = status;
121 }
122}
消息/系统通知相关接口更新操作通用参数,设置该操作相关的附加字段,设置该操作引发的推送内容
QChatUpdateSystemNotificationParam(@NonNull QChatUpdateParam updateParam, long msgIdServer, QChatSystemNotificationType type)
只能更新isPersistEnable为true的通知
void setStatus(Integer status)
设置状态,只能设置成自定义的状态(status>= 10000),否则提示414参数错误