Package dev.tobee.telegram.model.media
Record Class ChatMemberRestricted
java.lang.Object
java.lang.Record
dev.tobee.telegram.model.media.ChatMemberRestricted
- All Implemented Interfaces:
ChatMember
public record ChatMemberRestricted(String status, User user, boolean isMember, boolean canChangeInfo, boolean canInviteUsers, boolean canPinMessages, boolean canSendMessages, boolean canSendMediaMessages, boolean canSendPolls, boolean canSendOtherMessages, boolean canAddWebPagePreviews, long untilDate)
extends Record
implements ChatMember
-
Constructor Summary
ConstructorsConstructorDescriptionChatMemberRestricted(String status, User user, boolean isMember, boolean canChangeInfo, boolean canInviteUsers, boolean canPinMessages, boolean canSendMessages, boolean canSendMediaMessages, boolean canSendPolls, boolean canSendOtherMessages, boolean canAddWebPagePreviews, long untilDate) Creates an instance of aChatMemberRestrictedrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thecanAddWebPagePreviewsrecord component.booleanReturns the value of thecanChangeInforecord component.booleanReturns the value of thecanInviteUsersrecord component.booleanReturns the value of thecanPinMessagesrecord component.booleanReturns the value of thecanSendMediaMessagesrecord component.booleanReturns the value of thecanSendMessagesrecord component.booleanReturns the value of thecanSendOtherMessagesrecord component.booleanReturns the value of thecanSendPollsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisMember()Returns the value of theisMemberrecord component.status()Returns the value of thestatusrecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of theuntilDaterecord component.user()Returns the value of theuserrecord component.
-
Constructor Details
-
ChatMemberRestricted
public ChatMemberRestricted(String status, User user, boolean isMember, boolean canChangeInfo, boolean canInviteUsers, boolean canPinMessages, boolean canSendMessages, boolean canSendMediaMessages, boolean canSendPolls, boolean canSendOtherMessages, boolean canAddWebPagePreviews, long untilDate) Creates an instance of aChatMemberRestrictedrecord class.- Parameters:
status- the value for thestatusrecord componentuser- the value for theuserrecord componentisMember- the value for theisMemberrecord componentcanChangeInfo- the value for thecanChangeInforecord componentcanInviteUsers- the value for thecanInviteUsersrecord componentcanPinMessages- the value for thecanPinMessagesrecord componentcanSendMessages- the value for thecanSendMessagesrecord componentcanSendMediaMessages- the value for thecanSendMediaMessagesrecord componentcanSendPolls- the value for thecanSendPollsrecord componentcanSendOtherMessages- the value for thecanSendOtherMessagesrecord componentcanAddWebPagePreviews- the value for thecanAddWebPagePreviewsrecord componentuntilDate- the value for theuntilDaterecord 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 '=='. -
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
user
Returns the value of theuserrecord component.- Returns:
- the value of the
userrecord component
-
isMember
public boolean isMember()Returns the value of theisMemberrecord component.- Returns:
- the value of the
isMemberrecord component
-
canChangeInfo
public boolean canChangeInfo()Returns the value of thecanChangeInforecord component.- Returns:
- the value of the
canChangeInforecord component
-
canInviteUsers
public boolean canInviteUsers()Returns the value of thecanInviteUsersrecord component.- Returns:
- the value of the
canInviteUsersrecord component
-
canPinMessages
public boolean canPinMessages()Returns the value of thecanPinMessagesrecord component.- Returns:
- the value of the
canPinMessagesrecord component
-
canSendMessages
public boolean canSendMessages()Returns the value of thecanSendMessagesrecord component.- Returns:
- the value of the
canSendMessagesrecord component
-
canSendMediaMessages
public boolean canSendMediaMessages()Returns the value of thecanSendMediaMessagesrecord component.- Returns:
- the value of the
canSendMediaMessagesrecord component
-
canSendPolls
public boolean canSendPolls()Returns the value of thecanSendPollsrecord component.- Returns:
- the value of the
canSendPollsrecord component
-
canSendOtherMessages
public boolean canSendOtherMessages()Returns the value of thecanSendOtherMessagesrecord component.- Returns:
- the value of the
canSendOtherMessagesrecord component
-
canAddWebPagePreviews
public boolean canAddWebPagePreviews()Returns the value of thecanAddWebPagePreviewsrecord component.- Returns:
- the value of the
canAddWebPagePreviewsrecord component
-
untilDate
public long untilDate()Returns the value of theuntilDaterecord component.- Returns:
- the value of the
untilDaterecord component
-