NIMSDK-AOS  10.5.0
QChatCreateServerParam.java
浏览该文件的文档.
1 package com.netease.nimlib.sdk.qchat.param;
2 
3 import androidx.annotation.NonNull;
4 import androidx.annotation.Nullable;
5 
8 
12 public class QChatCreateServerParam extends QChatAntiSpamConfigParam{
13 
17  @NonNull
18  private final String name;
22  private String icon;
26  private String custom;
30  @NonNull
31  private QChatInviteMode inviteMode = QChatInviteMode.AGREE_NEED;
35  @NonNull
37 
41  @Nullable
42  private Integer searchType;
43 
47  private boolean searchEnable = true;
48 
53  public QChatCreateServerParam(@NonNull String name) {
54  this.name = name;
55  }
56 
61  public void setIcon(String icon) {
62  this.icon = icon;
63  }
64 
69  public void setCustom(String custom) {
70  this.custom = custom;
71  }
72 
78  public void setInviteMode(@NonNull QChatInviteMode inviteMode) {
79  this.inviteMode = inviteMode;
80  }
81 
86  public void setApplyJoinMode(@NonNull QChatApplyJoinMode applyJoinMode) {
87  this.applyJoinMode = applyJoinMode;
88  }
89 
94  public void setSearchType(@Nullable Integer searchType) {
95  this.searchType = searchType;
96  }
97 
101  public void setSearchEnable(boolean searchEnable) {
102  this.searchEnable = searchEnable;
103  }
104 
109  @NonNull
110  public String getName() {
111  return name;
112  }
113 
118  public String getIcon() {
119  return icon;
120  }
121 
126  public String getCustom() {
127  return custom;
128  }
129 
135  @NonNull
137  return inviteMode;
138  }
139 
144  @NonNull
146  return applyJoinMode;
147  }
148 
152  @Nullable
153  public Integer getSearchType() {
154  return searchType;
155  }
156 
160  public boolean getSearchEnable() {
161  return searchEnable;
162  }
163 }
void setApplyJoinMode(@NonNull QChatApplyJoinMode applyJoinMode)
设置申请模式
void setSearchEnable(boolean searchEnable)
设置服务器是否允许被搜索
QChatInviteMode getInviteMode()
获取邀请模式 邀请模式:AGREE_NEED(0)-邀请需要同意(默认),AGREE_NEED_NOT(1)-邀请不需要同意 ...
void setInviteMode(@NonNull QChatInviteMode inviteMode)
设置邀请模式 邀请模式:AGREE_NEED(0)-邀请需要同意(默认),AGREE_NEED_NOT(1)-邀请不需要同意 ...
boolean getSearchEnable()
获取服务器是否允许被搜索
void setSearchType(@Nullable Integer searchType)
设置服务器搜索类型