NIMSDK-AOS  9.19.0
QChatCheckPermissionParam.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  * 频道Id
19  */
20  private final Long channelId;
21  /**
22  * 身份组权限资源项
23  */
24  private final QChatRoleResource permission;
25 
26  /**
27  * 查询server权限(此时不需要传channelId)
28  * @param serverId 服务器Id
29  * @param permission 身份组权限资源项
30  */
31  public QChatCheckPermissionParam(long serverId, QChatRoleResource permission) {
32  this.serverId = serverId;
33  this.channelId = null;
34  this.permission = permission;
35  }
36 
37  /**
38  * 查询权限
39  * @param serverId 服务器Id
40  * @param channelId 频道Id
41  * @param permission 身份组权限资源项
42  */
43  public QChatCheckPermissionParam(long serverId, long channelId, QChatRoleResource permission) {
44  this.serverId = serverId;
45  this.channelId = channelId;
46  this.permission = permission;
47  }
48 
49  /**
50  * 获取服务器Id
51  * @return
52  */
53  @NonNull
54  public Long getServerId() {
55  return serverId;
56  }
57 
58  /**
59  * 获取频道Id
60  * @return
61  */
62  public Long getChannelId() {
63  return channelId;
64  }
65 
66  /**
67  * 获取身份组权限资源项
68  * @return
69  */
71  return permission;
72  }
73 }
QChatCheckPermissionParam(long serverId, QChatRoleResource permission)
查询server权限(此时不需要传channelId)
QChatRoleResource getPermission()
获取身份组权限资源项
QChatCheckPermissionParam(long serverId, long channelId, QChatRoleResource permission)
查询权限
"查询自己是否拥有某个权限"接口入参