Record Class BotConfig
java.lang.Object
java.lang.Record
dev.despical.musicbot.config.BotConfig
public record BotConfig(String token, String spotifyClientId, String spotifyClientSecret, YoutubeConfig youtube, BotLanguage defaultLanguage)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionBotConfig(String token, String spotifyClientId, String spotifyClientSecret, YoutubeConfig youtube, BotLanguage defaultLanguage) Creates an instance of aBotConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedefaultLanguagerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static BotConfigload()Returns the value of thespotifyClientIdrecord component.Returns the value of thespotifyClientSecretrecord component.token()Returns the value of thetokenrecord component.final StringtoString()Returns a string representation of this record class.youtube()Returns the value of theyoutuberecord component.
-
Constructor Details
-
BotConfig
public BotConfig(String token, String spotifyClientId, String spotifyClientSecret, YoutubeConfig youtube, BotLanguage defaultLanguage) Creates an instance of aBotConfigrecord class.- Parameters:
token- the value for thetokenrecord componentspotifyClientId- the value for thespotifyClientIdrecord componentspotifyClientSecret- the value for thespotifyClientSecretrecord componentyoutube- the value for theyoutuberecord componentdefaultLanguage- the value for thedefaultLanguagerecord component
-
-
Method Details
-
load
-
toString
-
hashCode
-
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). -
token
Returns the value of thetokenrecord component.- Returns:
- the value of the
tokenrecord component
-
spotifyClientId
Returns the value of thespotifyClientIdrecord component.- Returns:
- the value of the
spotifyClientIdrecord component
-
spotifyClientSecret
Returns the value of thespotifyClientSecretrecord component.- Returns:
- the value of the
spotifyClientSecretrecord component
-
youtube
Returns the value of theyoutuberecord component.- Returns:
- the value of the
youtuberecord component
-
defaultLanguage
Returns the value of thedefaultLanguagerecord component.- Returns:
- the value of the
defaultLanguagerecord component
-