Package de.jcm.discordgamesdk
Record Class ApplicationManager.DiscordOAuth2Token
java.lang.Object
java.lang.Record
de.jcm.discordgamesdk.ApplicationManager.DiscordOAuth2Token
- Record Components:
accessToken
- the access token itselfscopes
- a set of the scopes the token is authorized forexpires
- expiration date of the token
- Enclosing class:
ApplicationManager
public static record ApplicationManager.DiscordOAuth2Token(String accessToken, Set<String> scopes, Date expires)
extends Record
A Discord OAuth2 token.
-
Constructor Summary
ConstructorDescriptionDiscordOAuth2Token
(String accessToken, Set<String> scopes, Date expires) Creates an instance of aDiscordOAuth2Token
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaccessToken
record component.final boolean
Indicates whether some other object is "equal to" this one.expires()
Returns the value of theexpires
record component.final int
hashCode()
Returns a hash code value for this object.scopes()
Returns the value of thescopes
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
DiscordOAuth2Token
Creates an instance of aDiscordOAuth2Token
record class.- Parameters:
accessToken
- the value for theaccessToken
record componentscopes
- the value for thescopes
record componentexpires
- the value for theexpires
record component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
accessToken
Returns the value of theaccessToken
record component.- Returns:
- the value of the
accessToken
record component
-
scopes
Returns the value of thescopes
record component.- Returns:
- the value of the
scopes
record component
-
expires
Returns the value of theexpires
record component.- Returns:
- the value of the
expires
record component
-