NIMSDK-AOS  10.11.10
V2NIMUnsubscribeUserStatusOption.java
浏览该文件的文档.
1 package com.netease.nimlib.sdk.v2.subscription.option;
2 
3 import com.netease.nimlib.log.NimLog;
4 import java.util.List;
5 
6 /**
7  * 取消订阅用户状态请求参数
8  */
10 
11  /**
12  * 取消订阅的成员列表,为空,则表示取消所有订阅的成员, 否则取消指定的成员
13  * 单次数量不超过100, 超过返回191004
14  */
15  private List<String> accountIds;
16 
17  private static final int MAX_ACCOUNT_IDS_SIZE = 100;
18 
20  this.accountIds = null;
21  }
22 
23  /**
24  * @param accountIds 取消订阅的成员列表
25  */
26  public V2NIMUnsubscribeUserStatusOption(List<String> accountIds) {
27  this.accountIds = accountIds;
28  }
29 
30  /**
31  * 获取取消订阅的成员列表
32  *
33  * @return 取消订阅的成员列表
34  */
35  public List<String> getAccountIds() {
36  return accountIds;
37  }
38 
39  /**
40  * 设置取消订阅的成员列表
41  * @param accountIds 取消订阅的成员列表
42  */
43  public void setAccountIds(List<String> accountIds) {
44  this.accountIds = accountIds;
45  }
46 
47  public boolean isValid() {
48  if(accountIds != null && accountIds.size() > MAX_ACCOUNT_IDS_SIZE) {
49  NimLog.e("V2NIMUnsubscribeUserStatusOption", "accountIds size is invalid");
50  return false;
51  }
52  return true;
53  }
54 }
void setAccountIds(List< String > accountIds)
设置取消订阅的成员列表