Class AltAccount.Builder
java.lang.Object
lol.trq.alts.model.AltAccount.Builder
- Enclosing class:
AltAccount
Builds an
AltAccount field by field. Every setter takes null (or 0) as "none",
as the account's fields do. A builder is not thread-safe; the account it builds is immutable and takes
its own copy of the bans.- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptionaccessToken(String value) Sets the access token.Sets the ban records keyed by server id.build()Builds the account.expiresAt(long value) Sets the epoch-millis expiry of the access token.lastUsed(long value) Sets the epoch-millis time of the last successful login.lastUsedBy(String value) Sets the member that last used the account in a shared repository.refreshToken(String value) Sets the OAuth refresh token.sourceClient(String value) Sets the client (mod) the alt was added from.sourceUser(String value) Sets the user within the source client that added the alt.type(AccountType value) Sets the account type.Sets the username.
-
Method Details
-
username
Sets the username.- Parameters:
value- the username- Returns:
- this builder
- Since:
- 1.0.0
-
accessToken
Sets the access token.- Parameters:
value- the access token- Returns:
- this builder
- Since:
- 1.0.0
-
type
Sets the account type.- Parameters:
value- the authentication protocol- Returns:
- this builder
- Since:
- 1.0.0
-
lastUsed
Sets the epoch-millis time of the last successful login.- Parameters:
value- the last-used time, or0for never- Returns:
- this builder
- Since:
- 1.0.0
-
lastUsedBy
Sets the member that last used the account in a shared repository.- Parameters:
value- the member id, ornull- Returns:
- this builder
- Since:
- 1.0.0
-
bans
Sets the ban records keyed by server id. The account takes its own copy when built.- Parameters:
value- the bans, ornullfor never observed banned- Returns:
- this builder
- Since:
- 1.0.0
-
sourceClient
Sets the client (mod) the alt was added from.- Parameters:
value- the source client, ornull- Returns:
- this builder
- Since:
- 1.0.0
-
sourceUser
Sets the user within the source client that added the alt.- Parameters:
value- the source user, ornull- Returns:
- this builder
- Since:
- 1.0.0
-
refreshToken
Sets the OAuth refresh token.- Parameters:
value- the refresh token, ornullfor none- Returns:
- this builder
- Since:
- 1.0.0
-
expiresAt
Sets the epoch-millis expiry of the access token.- Parameters:
value- the expiry, or0when unknown- Returns:
- this builder
- Since:
- 1.0.0
-
build
-