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
ConstructorsConstructorDescriptionDiscordOAuth2Token(String accessToken, Set<String> scopes, Date expires) Creates an instance of aDiscordOAuth2Tokenrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaccessTokenrecord component.final booleanIndicates whether some other object is "equal to" this one.expires()Returns the value of theexpiresrecord component.final inthashCode()Returns a hash code value for this object.scopes()Returns the value of thescopesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DiscordOAuth2Token
Creates an instance of aDiscordOAuth2Tokenrecord class.- Parameters:
accessToken- the value for theaccessTokenrecord componentscopes- the value for thescopesrecord componentexpires- the value for theexpiresrecord 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 theaccessTokenrecord component.- Returns:
- the value of the
accessTokenrecord component
-
scopes
Returns the value of thescopesrecord component.- Returns:
- the value of the
scopesrecord component
-
expires
Returns the value of theexpiresrecord component.- Returns:
- the value of the
expiresrecord component
-