Record Class User
java.lang.Object
java.lang.Record
org.teleight.teleightbots.api.objects.User
- All Implemented Interfaces:
Serializable,ApiResult
public record User(Long id, boolean isBot, String firstName, @Nullable String lastName, @Nullable String username, @Nullable String language_code, boolean isPremium, boolean addedToAttachmentMenu, boolean canJoinGroups, boolean canReadAllGroupMessages, boolean supportsInlineQueries, boolean canConnectToBusiness, boolean hasMainWebApp, boolean hasTopicsEnabled, boolean allowsUsersToCreateTopics)
extends Record
implements ApiResult
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionUser(Long id, boolean isBot, String firstName, @Nullable String lastName, @Nullable String username, @Nullable String language_code, boolean isPremium, boolean addedToAttachmentMenu, boolean canJoinGroups, boolean canReadAllGroupMessages, boolean supportsInlineQueries, boolean canConnectToBusiness, boolean hasMainWebApp, boolean hasTopicsEnabled, boolean allowsUsersToCreateTopics) Creates an instance of aUserrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theaddedToAttachmentMenurecord component.booleanReturns the value of theallowsUsersToCreateTopicsrecord component.booleanReturns the value of thecanConnectToBusinessrecord component.booleanReturns the value of thecanJoinGroupsrecord component.booleanReturns the value of thecanReadAllGroupMessagesrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefirstNamerecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of thehasMainWebApprecord component.booleanReturns the value of thehasTopicsEnabledrecord component.id()Returns the value of theidrecord component.booleanisBot()Returns the value of theisBotrecord component.booleanReturns the value of theisPremiumrecord component.@Nullable StringReturns the value of thelanguage_coderecord component.@Nullable StringlastName()Returns the value of thelastNamerecord component.booleanReturns the value of thesupportsInlineQueriesrecord component.final StringtoString()Returns a string representation of this record class.@Nullable Stringusername()Returns the value of theusernamerecord component.
-
Constructor Details
-
User
public User(Long id, boolean isBot, String firstName, @Nullable @Nullable String lastName, @Nullable @Nullable String username, @Nullable @Nullable String language_code, boolean isPremium, boolean addedToAttachmentMenu, boolean canJoinGroups, boolean canReadAllGroupMessages, boolean supportsInlineQueries, boolean canConnectToBusiness, boolean hasMainWebApp, boolean hasTopicsEnabled, boolean allowsUsersToCreateTopics) Creates an instance of aUserrecord class.- Parameters:
id- the value for theidrecord componentisBot- the value for theisBotrecord componentfirstName- the value for thefirstNamerecord componentlastName- the value for thelastNamerecord componentusername- the value for theusernamerecord componentlanguage_code- the value for thelanguage_coderecord componentisPremium- the value for theisPremiumrecord componentaddedToAttachmentMenu- the value for theaddedToAttachmentMenurecord componentcanJoinGroups- the value for thecanJoinGroupsrecord componentcanReadAllGroupMessages- the value for thecanReadAllGroupMessagesrecord componentsupportsInlineQueries- the value for thesupportsInlineQueriesrecord componentcanConnectToBusiness- the value for thecanConnectToBusinessrecord componenthasMainWebApp- the value for thehasMainWebApprecord componenthasTopicsEnabled- the value for thehasTopicsEnabledrecord componentallowsUsersToCreateTopics- the value for theallowsUsersToCreateTopicsrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
isBot
public boolean isBot()Returns the value of theisBotrecord component.- Returns:
- the value of the
isBotrecord component
-
firstName
Returns the value of thefirstNamerecord component.- Returns:
- the value of the
firstNamerecord component
-
lastName
Returns the value of thelastNamerecord component.- Returns:
- the value of the
lastNamerecord component
-
username
Returns the value of theusernamerecord component.- Returns:
- the value of the
usernamerecord component
-
language_code
Returns the value of thelanguage_coderecord component.- Returns:
- the value of the
language_coderecord component
-
isPremium
public boolean isPremium()Returns the value of theisPremiumrecord component.- Returns:
- the value of the
isPremiumrecord component
-
addedToAttachmentMenu
public boolean addedToAttachmentMenu()Returns the value of theaddedToAttachmentMenurecord component.- Returns:
- the value of the
addedToAttachmentMenurecord component
-
canJoinGroups
public boolean canJoinGroups()Returns the value of thecanJoinGroupsrecord component.- Returns:
- the value of the
canJoinGroupsrecord component
-
canReadAllGroupMessages
public boolean canReadAllGroupMessages()Returns the value of thecanReadAllGroupMessagesrecord component.- Returns:
- the value of the
canReadAllGroupMessagesrecord component
-
supportsInlineQueries
public boolean supportsInlineQueries()Returns the value of thesupportsInlineQueriesrecord component.- Returns:
- the value of the
supportsInlineQueriesrecord component
-
canConnectToBusiness
public boolean canConnectToBusiness()Returns the value of thecanConnectToBusinessrecord component.- Returns:
- the value of the
canConnectToBusinessrecord component
-
hasMainWebApp
public boolean hasMainWebApp()Returns the value of thehasMainWebApprecord component.- Returns:
- the value of the
hasMainWebApprecord component
-
hasTopicsEnabled
public boolean hasTopicsEnabled()Returns the value of thehasTopicsEnabledrecord component.- Returns:
- the value of the
hasTopicsEnabledrecord component
-
allowsUsersToCreateTopics
public boolean allowsUsersToCreateTopics()Returns the value of theallowsUsersToCreateTopicsrecord component.- Returns:
- the value of the
allowsUsersToCreateTopicsrecord component
-