Package dev.tobee.telegram.model
Record Class ChatInviteLink
java.lang.Object
java.lang.Record
dev.tobee.telegram.model.ChatInviteLink
public record ChatInviteLink(String inviteLink, User creator, boolean isPrimary, boolean isRevoked, OptionalLong expireDate, OptionalInt memberLimit)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionChatInviteLink(String inviteLink, User creator, boolean isPrimary, boolean isRevoked, OptionalLong expireDate, OptionalInt memberLimit)Creates an instance of aChatInviteLinkrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncreator()Returns the value of thecreatorrecord component.booleanIndicates whether some other object is "equal to" this one.Returns the value of theexpireDaterecord component.inthashCode()Returns a hash code value for this object.Returns the value of theinviteLinkrecord component.booleanReturns the value of theisPrimaryrecord component.booleanReturns the value of theisRevokedrecord component.Returns the value of thememberLimitrecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
ChatInviteLink
public ChatInviteLink(String inviteLink, User creator, boolean isPrimary, boolean isRevoked, OptionalLong expireDate, OptionalInt memberLimit)Creates an instance of aChatInviteLinkrecord class.- Parameters:
inviteLink- the value for theinviteLinkrecord componentcreator- the value for thecreatorrecord componentisPrimary- the value for theisPrimaryrecord componentisRevoked- the value for theisRevokedrecord componentexpireDate- the value for theexpireDaterecord componentmemberLimit- the value for thememberLimitrecord 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 '=='. -
inviteLink
Returns the value of theinviteLinkrecord component.- Returns:
- the value of the
inviteLinkrecord component
-
creator
Returns the value of thecreatorrecord component.- Returns:
- the value of the
creatorrecord component
-
isPrimary
public boolean isPrimary()Returns the value of theisPrimaryrecord component.- Returns:
- the value of the
isPrimaryrecord component
-
isRevoked
public boolean isRevoked()Returns the value of theisRevokedrecord component.- Returns:
- the value of the
isRevokedrecord component
-
expireDate
Returns the value of theexpireDaterecord component.- Returns:
- the value of the
expireDaterecord component
-
memberLimit
Returns the value of thememberLimitrecord component.- Returns:
- the value of the
memberLimitrecord component
-