Package dev.tobee.telegram.model
Record Class ChatMemberUpdated
java.lang.Object
java.lang.Record
dev.tobee.telegram.model.ChatMemberUpdated
public record ChatMemberUpdated(Chat chat, User user, int date, ChatMember oldChatMember, ChatMember newChatMember, Optional<ChatInviteLink> inviteLink)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionChatMemberUpdated(Chat chat, User user, int date, ChatMember oldChatMember, ChatMember newChatMember, Optional<ChatInviteLink> inviteLink)Creates an instance of aChatMemberUpdatedrecord class. -
Method Summary
Modifier and TypeMethodDescriptionchat()Returns the value of thechatrecord component.intdate()Returns the value of thedaterecord component.booleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.Returns the value of theinviteLinkrecord component.Returns the value of thenewChatMemberrecord component.Returns the value of theoldChatMemberrecord component.toString()Returns a string representation of this record class.user()Returns the value of theuserrecord component.
-
Constructor Details
-
ChatMemberUpdated
public ChatMemberUpdated(Chat chat, User user, int date, ChatMember oldChatMember, ChatMember newChatMember, Optional<ChatInviteLink> inviteLink)Creates an instance of aChatMemberUpdatedrecord class.- Parameters:
chat- the value for thechatrecord componentuser- the value for theuserrecord componentdate- the value for thedaterecord componentoldChatMember- the value for theoldChatMemberrecord componentnewChatMember- the value for thenewChatMemberrecord 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
-
user
Returns the value of theuserrecord component.- Returns:
- the value of the
userrecord component
-
date
public int date()Returns the value of thedaterecord component.- Returns:
- the value of the
daterecord component
-
oldChatMember
Returns the value of theoldChatMemberrecord component.- Returns:
- the value of the
oldChatMemberrecord component
-
newChatMember
Returns the value of thenewChatMemberrecord component.- Returns:
- the value of the
newChatMemberrecord component
-
inviteLink
Returns the value of theinviteLinkrecord component.- Returns:
- the value of the
inviteLinkrecord component
-