Package dev.tobee.telegram.model.message
Record Class User
java.lang.Object
java.lang.Record
dev.tobee.telegram.model.message.User
-
Constructor Summary
ConstructorsConstructorDescriptionUser(Long id, Boolean isBot, String firstName, Optional<String> lastName, Optional<String> username, Optional<String> languageCode, Optional<Boolean> canJoinGroups, Optional<Boolean> canReadAllGroupMessages, Optional<Boolean> supportsInlineQueries) Creates an instance of aUserrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecanJoinGroupsrecord component.Returns 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.id()Returns the value of theidrecord component.isBot()Returns the value of theisBotrecord component.Returns the value of thelanguageCoderecord component.lastName()Returns the value of thelastNamerecord component.Returns the value of thesupportsInlineQueriesrecord component.final StringtoString()Returns a string representation of this record class.username()Returns the value of theusernamerecord component.
-
Constructor Details
-
User
public User(Long id, Boolean isBot, String firstName, Optional<String> lastName, Optional<String> username, Optional<String> languageCode, Optional<Boolean> canJoinGroups, Optional<Boolean> canReadAllGroupMessages, Optional<Boolean> supportsInlineQueries) 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 componentlanguageCode- the value for thelanguageCoderecord componentcanJoinGroups- the value for thecanJoinGroupsrecord componentcanReadAllGroupMessages- the value for thecanReadAllGroupMessagesrecord componentsupportsInlineQueries- the value for thesupportsInlineQueriesrecord 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). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
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
-
languageCode
Returns the value of thelanguageCoderecord component.- Returns:
- the value of the
languageCoderecord component
-
canJoinGroups
Returns the value of thecanJoinGroupsrecord component.- Returns:
- the value of the
canJoinGroupsrecord component
-
canReadAllGroupMessages
Returns the value of thecanReadAllGroupMessagesrecord component.- Returns:
- the value of the
canReadAllGroupMessagesrecord component
-
supportsInlineQueries
Returns the value of thesupportsInlineQueriesrecord component.- Returns:
- the value of the
supportsInlineQueriesrecord component
-