public class UserState
The user state.
public UserState(@NotNull
java.time.Instant creationDate,
@NotNull
java.util.Map<java.lang.String,ai.tock.bot.engine.user.TimeBoxedFlag> flags)
The user state.
creationDate - The user creation date.flags - The flag for this user - useful to store basic information about this user.public UserState()
The user state.
public void cleanup()
Cleanup the state.
public boolean getProfileLoaded()
public void setProfileLoaded(boolean value)
public boolean getBotDisabled()
public void setBotDisabled(boolean value)
@Nullable
public java.lang.String getFlag(@NotNull
java.lang.String flag)
public boolean hasFlag(@NotNull
java.lang.String flag)
public void setFlag(@NotNull
java.lang.String flag,
long timeoutInMinutes,
@NotNull
java.lang.String value)
public void setFlag(@NotNull
java.lang.String flag,
@NotNull
java.time.Duration timeoutDuration,
@NotNull
java.lang.String value)
public void removeFlag(@NotNull
java.lang.String flag)
public void setUnlimitedFlag(@NotNull
java.lang.String flag,
@NotNull
java.lang.String value)
@NotNull public java.time.Instant getCreationDate()
The user creation date.
@NotNull public java.util.Map<java.lang.String,ai.tock.bot.engine.user.TimeBoxedFlag> getFlags()
The flag for this user
- useful to store basic information about this user.
@NotNull public java.time.Instant component1()
The user creation date.
@NotNull public java.util.Map<java.lang.String,ai.tock.bot.engine.user.TimeBoxedFlag> component2()
The flag for this user
- useful to store basic information about this user.
@NotNull public UserState copy(@NotNull java.time.Instant creationDate, @NotNull java.util.Map<java.lang.String,ai.tock.bot.engine.user.TimeBoxedFlag> flags)
The user state.
@NotNull public java.lang.String toString()
The user state.
public int hashCode()
The user state.
public boolean equals(@Nullable
java.lang.Object p)
The user state.