io.agora.rtm.PresenceOptions Maven / Gradle / Ivy
package io.agora.rtm;
import io.agora.common.internal.CalledByNative;
/**
* The option to query user presence.
*/
public class PresenceOptions {
/**
* 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 = "";
/**
* Creates a new instance of {@code PresenceOptions} with default parameters.
*/
public PresenceOptions() {
this.includeUserId = true;
this.includeState = false;
}
/**
* Creates a new instance of {@code PresenceOptions} with specifies options.
*
* @param includeUserId Whether to display user id in query result
* @param includeState Whether to display user state in query result
*/
public PresenceOptions(boolean includeUserId, boolean includeState) {
this.includeUserId = includeUserId;
this.includeState = includeState;
}
/**
* Creates a new instance of {@code PresenceOptions} 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 PresenceOptions(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 "PresenceOptions {includeUserId: " + includeUserId + ", includeState: " + includeState
+ ", page: " + page + "}";
}
}