Package dev.tobee.telegram.response
Record Class GetMeResponse
java.lang.Object
java.lang.Record
dev.tobee.telegram.response.GetMeResponse
-
Constructor Summary
ConstructorsConstructorDescriptionGetMeResponse(String id, boolean isBot, Optional<String> firstName, Optional<String> lastName, Optional<String> username, Optional<String> languageCode, boolean canJoinGroups, boolean canReadAllGroupMessages, boolean supportsInlineQueries)Creates an instance of aGetMeResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thecanJoinGroupsrecord component.booleanReturns the value of thecanReadAllGroupMessagesrecord component.booleanIndicates whether some other object is "equal to" this one.Returns the value of thefirstNamerecord component.inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.booleanisBot()Returns the value of theisBotrecord component.Returns the value of thelanguageCoderecord component.lastName()Returns the value of thelastNamerecord component.booleanReturns the value of thesupportsInlineQueriesrecord component.toString()Returns a string representation of this record class.username()Returns the value of theusernamerecord component.
-
Constructor Details
-
GetMeResponse
public GetMeResponse(String id, boolean isBot, Optional<String> firstName, Optional<String> lastName, Optional<String> username, Optional<String> languageCode, boolean canJoinGroups, boolean canReadAllGroupMessages, boolean supportsInlineQueries)Creates an instance of aGetMeResponserecord 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. 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
-
languageCode
Returns the value of thelanguageCoderecord component.- Returns:
- the value of the
languageCoderecord 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
-