NIMSDK-AOS 10.4.0-beta
载入中...
搜索中...
未找到
QChatUpdateUserServerPushConfigParam.java
浏览该文件的文档.
1package com.netease.nimlib.sdk.qchat.param;
2
3import androidx.annotation.NonNull;
4import com.netease.nimlib.sdk.qchat.enums.QChatPushMsgType;
5
6/**
7 * "更新用户服务器推送配置"接口入参
8 */
10
11 /**
12 * 服务器Id,必填
13 */
14 @NonNull
15 private final Long serverId;
16
17 /**
18 * @param serverId 服务器Id
19 * @param pushMsgType 推送消息类型选项
20 */
21 public QChatUpdateUserServerPushConfigParam(@NonNull long serverId, @NonNull QChatPushMsgType pushMsgType) {
22 super(pushMsgType);
23 this.serverId = serverId;
24 }
25
26 /**
27 * 获取服务器Id
28 * @return
29 */
30 @NonNull
31 public Long getServerId() {
32 return serverId;
33 }
34
35 /**
36 * 获取推送消息类型选项
37 * @return
38 */
39 @Override
40 @NonNull
42 return super.getPushMsgType();
43 }
44
45 /**
46 * 参数是否合法
47 * @return
48 */
49 public boolean isValid(){
50 if(serverId <= 0){
51 return false;
52 }
53
54 if(getPushMsgType() == null){
55 return false;
56 }
57
58 return true;
59 }
60
61 @Override
62 public String toString() {
63 return "QChatUpdateUserServerPushConfigParam{" +
64 "pushMsgType=" + pushMsgType +
65 ", serverId=" + serverId +
66 '}';
67 }
68}
QChatUpdateUserServerPushConfigParam(@NonNull long serverId, @NonNull QChatPushMsgType pushMsgType)
推送消息类型选项 低等级消息:普通消息等(没有具体目标、没有@意愿) 中等级消息: @所有人等(没有具体目标、有@意愿) 高等级消息: @某些人等(有具体目标、有@意愿)