Package dev.tobee.telegram.model.chat
Record Class ChatJoinRequest
java.lang.Object
java.lang.Record
dev.tobee.telegram.model.chat.ChatJoinRequest
-
Constructor Summary
ConstructorsConstructorDescriptionChatJoinRequest(Chat chat, User from, long date, Optional<String> bio, Optional<ChatInviteLink> inviteLink) Creates an instance of aChatJoinRequestrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbio()Returns the value of thebiorecord component.chat()Returns the value of thechatrecord component.longdate()Returns the value of thedaterecord component.final booleanIndicates whether some other object is "equal to" this one.from()Returns the value of thefromrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theinviteLinkrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ChatJoinRequest
public ChatJoinRequest(Chat chat, User from, long date, Optional<String> bio, Optional<ChatInviteLink> inviteLink) Creates an instance of aChatJoinRequestrecord class.- Parameters:
chat- the value for thechatrecord componentfrom- the value for thefromrecord componentdate- the value for thedaterecord componentbio- the value for thebiorecord componentinviteLink- the value for theinviteLinkrecord 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 '=='. -
chat
Returns the value of thechatrecord component.- Returns:
- the value of the
chatrecord component
-
from
Returns the value of thefromrecord component.- Returns:
- the value of the
fromrecord component
-
date
public long date()Returns the value of thedaterecord component.- Returns:
- the value of the
daterecord component
-
bio
Returns the value of thebiorecord component.- Returns:
- the value of the
biorecord component
-
inviteLink
Returns the value of theinviteLinkrecord component.- Returns:
- the value of the
inviteLinkrecord component
-