io.agora.rtm.GetOnlineUsersOptions Maven / Gradle / Ivy
package io.agora.rtm;
import io.agora.common.internal.CalledByNative;
/**
* This class represents options for retrieving online users. It provides
* the ability to specify whether to include the user ID, user state,
* and pagination data when retrieving online users.
*/
public class GetOnlineUsersOptions {
/**
* Whether to display user id in query result
*/
private boolean includeUserId;
/**
* Whether to display user state in query result
*/
private boolean includeState;
/**
* The paging object used for pagination.
*/
private String page = "";
/**
* Constructs an {@code GetOnlineUsersOptions} object with default parameters.
*/
public GetOnlineUsersOptions() {
this.includeUserId = true;
this.includeState = false;
}
/**
* Constructs an {@code GetOnlineUsersOptions} object with the specified
* options(whether include user id and state)
*
* @param includeUserId Whether to display user id in query result
* @param includeState Whether to display user state in query result
*/
public GetOnlineUsersOptions(boolean includeUserId, boolean includeState) {
this.includeUserId = includeUserId;
this.includeState = includeState;
}
/**
* Constructs a new instance of {@code GetOnlineUsersOptions} with the specified options.
*
* @param includeUserId specifies whether to include the user ID in the query result.
* @param includeState specifies whether to include the user state in the query result.
* @param page the string of page for pagination
*/
public GetOnlineUsersOptions(boolean includeUserId, boolean includeState, String page) {
this.includeUserId = includeUserId;
this.includeState = includeState;
this.page = page;
}
public void setIncludeUserId(boolean includeUserId) {
this.includeUserId = includeUserId;
}
public void setIncludeState(boolean includeState) {
this.includeState = includeState;
}
public void setPage(String page) {
this.page = page;
}
@CalledByNative
public boolean getIncludeUserId() {
return this.includeUserId;
}
@CalledByNative
public boolean getIncludeState() {
return this.includeState;
}
@CalledByNative
public String getPage() {
return this.page;
}
@Override
public String toString() {
return "GetOnlineUsersOptions {includeUserId: " + includeUserId
+ ", includeState: " + includeState + ", page: " + page + "}";
}
}