NIMSDK-AOS  9.20.15
QChatGetChannelCategoriesByPageParam.java
浏览该文件的文档.
1 package com.netease.nimlib.sdk.qchat.param;
2 
3 import androidx.annotation.NonNull;
5 
6 /**
7  * "分页查询服务器下频道类别列表"接口入参
8  */
10 
11  /**
12  * 服务器Id
13  */
14  @NonNull
15  private final Long serverId;
16  /**
17  * 查询锚点时间戳
18  */
19  @NonNull
20  private final Long timeTag;
21  /**
22  * 查询数量限制
23  */
24  private Integer limit;
25  /**
26  * 查询排序类型
27  */
29  /**
30  * 分页标记
31  * 第一页不传
32  * 翻下一页传接口返回的cursor
33  */
34  private String cursor;
35 
37  this(0, 0);
38  }
39 
40  /**
41  *
42  * @param serverId 服务器Id
43  * @param timeTag 查询锚点时间戳,传0取当前时间戳
44  */
45  public QChatGetChannelCategoriesByPageParam(long serverId, long timeTag) {
46  this.serverId = serverId;
47  this.timeTag = timeTag;
48  }
49 
50  /**
51  *
52  * @param serverId 服务器Id
53  * @param timeTag 查询锚点时间戳,传0取当前时间戳
54  * @param limit 查询数量限制,默认100
55  * @param sortType 查询排序类型,默认CreateTime
56  * @param cursor 分页标记,第一页不传,翻下一页传接口返回的cursor
57  */
58  public QChatGetChannelCategoriesByPageParam(long serverId, long timeTag, Integer limit, QChatChannelCategorySearchSortEnum sortType, String cursor) {
59  this.serverId = serverId;
60  this.timeTag = timeTag;
61  this.limit = limit;
62  this.sortType = sortType;
63  this.cursor = cursor;
64  }
65 
66 
67 
68  /**
69  * 获取服务器id
70  * @return
71  */
72  @NonNull
73  public Long getServerId() {
74  return serverId;
75  }
76 
77  /**
78  * 获取查询时间戳
79  * @return
80  */
81  @NonNull
82  public Long getTimeTag() {
83  return timeTag;
84  }
85 
86  /**
87  * 获取查询数量限制
88  * @return
89  */
90  public Integer getLimit() {
91  return limit;
92  }
93 
94  /**
95  * 设置查询数量限制,默认100
96  * @param limit
97  */
98  public void setLimit(Integer limit) {
99  this.limit = limit;
100  }
101 
102  /**
103  * 获取排序类型
104  * @return 排序类型
105  */
107  return sortType;
108  }
109 
110  /**
111  * 设置排序类型
112  * @param sortType 排序类型
113  */
115  this.sortType = sortType;
116  }
117 
118  /**
119  * 获取分页标记
120  * @return 分页标记
121  */
122  public String getCursor() {
123  return cursor;
124  }
125 
126  /**
127  * 设置分页标记
128  * @param cursor 分页标记
129  */
130  public void setCursor(String cursor) {
131  this.cursor = cursor;
132  }
133 
134  /**
135  * QChatGetChannelCategoriesByPageParam 构造器
136  */
137  public static class Builder {
138  private Long serverId;
139  private Long timeTag;
140  private Integer limit;
142  private String cursor;
143 
144  /**
145  * 设置服务器id
146  * @param serverId 服务器id
147  * @return Builder
148  */
149  public Builder serverId(long serverId) {
150  this.serverId = serverId;
151  return this;
152  }
153 
154  /**
155  * 设置查询锚点时间戳
156  * @param timeTag 查询锚点时间戳,传0取当前时间戳
157  * @return Builder
158  */
159  public Builder timeTag(long timeTag) {
160  this.timeTag = timeTag;
161  return this;
162  }
163 
164  /**
165  * 设置查询数量限制
166  * @param limit 查询数量限制,默认100
167  * @return Builder
168  */
169  public Builder limit(int limit) {
170  this.limit = limit;
171  return this;
172  }
173 
174  /**
175  * 设置查询排序类型
176  * @param sortType 查询排序类型,默认CreateTime
177  * @return Builder
178  */
179  public Builder sortType(QChatChannelCategorySearchSortEnum sortType) {
180  this.sortType = sortType;
181  return this;
182  }
183 
184  /**
185  * 设置分页标记
186  * @param cursor 分页标记,第一页不传,翻下一页传接口返回的cursor
187  * @return Builder
188  */
189  public Builder cursor(String cursor) {
190  this.cursor = cursor;
191  return this;
192  }
193 
194  /**
195  * 构建QChatGetChannelCategoriesByPageParam
196  * @return QChatGetChannelCategoriesByPageParam
197  */
198  public QChatGetChannelCategoriesByPageParam build() {
199  return new QChatGetChannelCategoriesByPageParam(serverId, timeTag, limit, sortType, cursor);
200  }
201  }
202 }
void setSortType(QChatChannelCategorySearchSortEnum sortType)
设置排序类型
QChatGetChannelCategoriesByPageParam(long serverId, long timeTag, Integer limit, QChatChannelCategorySearchSortEnum sortType, String cursor)