io.agora.rtm.MetadataOptions Maven / Gradle / Ivy
package io.agora.rtm;
import io.agora.common.internal.CalledByNative;
/**
* Metadata options.
*/
public class MetadataOptions {
/**
* Indicates whether or not to notify server update the modify timestamp of metadata
*/
private boolean recordTs;
/**
* Indicates whether or not to notify server update the modify user id of metadata
*/
private boolean recordUserId;
/**
* Creates a new instance of {@code MetadataOptions} with default parameters.
*/
public MetadataOptions() {
this.recordTs = false;
this.recordUserId = false;
}
/**
* Creates a new instance of {@code MetadataOptions} with spec.
*
* @param recordTs Indicates whether or not to notify server update the modify timestamp of
* metadata
* @param recordUserId Indicates whether or not to notify server update the modify user id of
* metadata
*/
public MetadataOptions(boolean recordTs, boolean recordUserId) {
this.recordTs = recordTs;
this.recordUserId = recordUserId;
}
public void setRecordTs(boolean recordTs) {
this.recordTs = recordTs;
}
public void setRecordUserId(boolean recordUserId) {
this.recordUserId = recordUserId;
}
@CalledByNative
public boolean getRecordTs() {
return this.recordTs;
}
@CalledByNative
public boolean getRecordUserId() {
return this.recordUserId;
}
@Override
public String toString() {
return "MetadataOptions {recordTs: " + recordTs + ", recordUserId: " + recordUserId + "}";
}
}