1 package com.netease.nimlib.sdk.v2.message.params;
10 private Integer subType;
20 private String serverExtension;
40 private boolean clientAntispamEnabled =
false;
45 private String clientAntispamReplace =
"";
60 this.subType = subType;
84 return this.attachment;
92 this.attachment = attachment;
100 return this.serverExtension;
108 this.serverExtension = serverExtension;
116 if (this.antispamConfig == null) {
119 return this.antispamConfig;
128 this.antispamConfig = antispamConfig;
136 if (this.routeConfig == null) {
139 return this.routeConfig;
148 this.routeConfig = routeConfig;
156 if (this.pushConfig == null) {
159 return this.pushConfig;
169 this.pushConfig = pushConfig;
177 return this.clientAntispamEnabled;
185 this.clientAntispamEnabled = clientAntispamEnabled;
193 return this.clientAntispamReplace;
201 this.clientAntispamReplace = clientAntispamReplace;
205 if(subType != null && subType < 0){
214 if(attachment != null){
217 if(serverExtension != null){
226 public static final class V2NIMModifyMessageParamsBuilder {
229 private Integer subType;
238 private String serverExtension;
258 private boolean clientAntispamEnabled;
263 private String clientAntispamReplace;
265 private V2NIMModifyMessageParamsBuilder() {
272 public static V2NIMModifyMessageParamsBuilder builder() {
273 return new V2NIMModifyMessageParamsBuilder();
281 public V2NIMModifyMessageParamsBuilder withSubType(
int subType) {
282 this.subType = subType;
291 public V2NIMModifyMessageParamsBuilder withText(String text) {
302 this.attachment = attachment;
311 public V2NIMModifyMessageParamsBuilder withServerExtension(String serverExtension) {
312 this.serverExtension = serverExtension;
322 this.antispamConfig = antispamConfig;
332 this.routeConfig = routeConfig;
342 this.pushConfig = pushConfig;
351 public V2NIMModifyMessageParamsBuilder withClientAntispamEnabled(
boolean clientAntispamEnabled) {
352 this.clientAntispamEnabled = clientAntispamEnabled;
361 public V2NIMModifyMessageParamsBuilder withClientAntispamReplace(String clientAntispamReplace) {
362 this.clientAntispamReplace = clientAntispamReplace;
void setClientAntispamEnabled(boolean clientAntispamEnabled)
设置是否启用本地反垃圾
V2NIMMessageAntispamConfig getAntispamConfig()
获取反垃圾相关配置
void setAttachment(V2NIMMessageAttachment attachment)
设置消息附属附件
String getClientAntispamReplace()
获取反垃圾命中后替换的文本
void setSubType(Integer subType)
设置消息子类型
void setServerExtension(String serverExtension)
设置消息服务端扩展
void setPushConfig(V2NIMMessagePushConfig pushConfig)
设置推送相关配置
Integer getSubType()
获取消息子类型
void setText(String text)
设置消息内容
boolean isClientAntispamEnabled()
获取是否启用本地反垃圾
String getServerExtension()
获取消息服务端扩展
void setAntispamConfig(V2NIMMessageAntispamConfig antispamConfig)
设置反垃圾相关配置
V2NIMMessageAttachment getAttachment()
获取消息附属附件
void setRouteConfig(V2NIMMessageRouteConfig routeConfig)
设置路由抄送相关配置
void setClientAntispamReplace(String clientAntispamReplace)
设置反垃圾命中后替换的文本
V2NIMMessagePushConfig getPushConfig()
获取推送相关配置
V2NIMMessageRouteConfig getRouteConfig()
获取路由抄送相关配置