NIMSDK-AOS  10.9.70
V2NIMSendCustomNotificationParams.java
浏览该文件的文档.
1 package com.netease.nimlib.sdk.v2.notification.params;
2 
7 
8 // 通知发送相关参数
10 
11  // 通知相关配置,具体参见每一个字段定义
12  private final V2NIMNotificationConfig notificationConfig;
13 
14 
15  // 离线推送配置相关
16  private final V2NIMNotificationPushConfig pushConfig;
17 
18 
19  // 反垃圾相关配置
20  private final V2NIMNotificationAntispamConfig antispamConfig;
21 
22 
23  // 路由抄送相关配置
24  private final V2NIMNotificationRouteConfig routeConfig;
25 
27  this(null, null, null, null);
28  }
29 
31  this.notificationConfig = notificationConfig;
32  this.pushConfig = pushConfig;
33  this.antispamConfig = antispamConfig;
34  this.routeConfig = routeConfig;
35  }
36 
38  return notificationConfig;
39  }
40 
42  return pushConfig;
43  }
44 
46  return antispamConfig;
47  }
48 
50  return routeConfig;
51  }
52 
53 
54  public static final class V2NIMSendCustomNotificationParamsBuilder {
55  private V2NIMNotificationConfig notificationConfig;
56  private V2NIMNotificationPushConfig pushConfig;
57  private V2NIMNotificationAntispamConfig antispamConfig;
58  private V2NIMNotificationRouteConfig routeConfig;
59 
60  private V2NIMSendCustomNotificationParamsBuilder() {
61  }
62 
63  public static V2NIMSendCustomNotificationParamsBuilder builder() {
64  return new V2NIMSendCustomNotificationParamsBuilder();
65  }
66 
67  public V2NIMSendCustomNotificationParamsBuilder withNotificationConfig(V2NIMNotificationConfig notificationConfig) {
68  this.notificationConfig = notificationConfig;
69  return this;
70  }
71 
72  public V2NIMSendCustomNotificationParamsBuilder withPushConfig(V2NIMNotificationPushConfig pushConfig) {
73  this.pushConfig = pushConfig;
74  return this;
75  }
76 
77  public V2NIMSendCustomNotificationParamsBuilder withAntispamConfig(V2NIMNotificationAntispamConfig antispamConfig) {
78  this.antispamConfig = antispamConfig;
79  return this;
80  }
81 
82  public V2NIMSendCustomNotificationParamsBuilder withRouteConfig(V2NIMNotificationRouteConfig routeConfig) {
83  this.routeConfig = routeConfig;
84  return this;
85  }
86 
87  public V2NIMSendCustomNotificationParams build() {
88  return new V2NIMSendCustomNotificationParams(notificationConfig, pushConfig, antispamConfig, routeConfig);
89  }
90  }
91 }