Package dev.tobee.telegram.model.media
Record Class ChatMemberAdministrator
java.lang.Object
java.lang.Record
dev.tobee.telegram.model.media.ChatMemberAdministrator
- All Implemented Interfaces:
ChatMember
public record ChatMemberAdministrator(String status, User user, boolean canBeEdited, boolean isAnonymous, boolean canManageChat, boolean canDeleteMessages, boolean canManageVoiceChats, boolean canRestrictMembers, boolean canPromoteMembers, boolean canChangeInfo, boolean canInviteUsers, boolean canPostMessages, boolean canEditMessages, boolean canPinMessages, Optional<String> customTitle)
extends Record
implements ChatMember
-
Constructor Summary
ConstructorsConstructorDescriptionChatMemberAdministrator(String status, User user, boolean canBeEdited, boolean isAnonymous, boolean canManageChat, boolean canDeleteMessages, boolean canManageVoiceChats, boolean canRestrictMembers, boolean canPromoteMembers, boolean canChangeInfo, boolean canInviteUsers, boolean canPostMessages, boolean canEditMessages, boolean canPinMessages, Optional<String> customTitle) Creates an instance of aChatMemberAdministratorrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thecanBeEditedrecord component.booleanReturns the value of thecanChangeInforecord component.booleanReturns the value of thecanDeleteMessagesrecord component.booleanReturns the value of thecanEditMessagesrecord component.booleanReturns the value of thecanInviteUsersrecord component.booleanReturns the value of thecanManageChatrecord component.booleanReturns the value of thecanManageVoiceChatsrecord component.booleanReturns the value of thecanPinMessagesrecord component.booleanReturns the value of thecanPostMessagesrecord component.booleanReturns the value of thecanPromoteMembersrecord component.booleanReturns the value of thecanRestrictMembersrecord component.Returns the value of thecustomTitlerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theisAnonymousrecord component.status()Returns the value of thestatusrecord component.final StringtoString()Returns a string representation of this record class.user()Returns the value of theuserrecord component.
-
Constructor Details
-
ChatMemberAdministrator
public ChatMemberAdministrator(String status, User user, boolean canBeEdited, boolean isAnonymous, boolean canManageChat, boolean canDeleteMessages, boolean canManageVoiceChats, boolean canRestrictMembers, boolean canPromoteMembers, boolean canChangeInfo, boolean canInviteUsers, boolean canPostMessages, boolean canEditMessages, boolean canPinMessages, Optional<String> customTitle) Creates an instance of aChatMemberAdministratorrecord class.- Parameters:
status- the value for thestatusrecord componentuser- the value for theuserrecord componentcanBeEdited- the value for thecanBeEditedrecord componentisAnonymous- the value for theisAnonymousrecord componentcanManageChat- the value for thecanManageChatrecord componentcanDeleteMessages- the value for thecanDeleteMessagesrecord componentcanManageVoiceChats- the value for thecanManageVoiceChatsrecord componentcanRestrictMembers- the value for thecanRestrictMembersrecord componentcanPromoteMembers- the value for thecanPromoteMembersrecord componentcanChangeInfo- the value for thecanChangeInforecord componentcanInviteUsers- the value for thecanInviteUsersrecord componentcanPostMessages- the value for thecanPostMessagesrecord componentcanEditMessages- the value for thecanEditMessagesrecord componentcanPinMessages- the value for thecanPinMessagesrecord componentcustomTitle- the value for thecustomTitlerecord 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
-
canBeEdited
public boolean canBeEdited()Returns the value of thecanBeEditedrecord component.- Returns:
- the value of the
canBeEditedrecord component
-
isAnonymous
public boolean isAnonymous()Returns the value of theisAnonymousrecord component.- Returns:
- the value of the
isAnonymousrecord component
-
canManageChat
public boolean canManageChat()Returns the value of thecanManageChatrecord component.- Returns:
- the value of the
canManageChatrecord component
-
canDeleteMessages
public boolean canDeleteMessages()Returns the value of thecanDeleteMessagesrecord component.- Returns:
- the value of the
canDeleteMessagesrecord component
-
canManageVoiceChats
public boolean canManageVoiceChats()Returns the value of thecanManageVoiceChatsrecord component.- Returns:
- the value of the
canManageVoiceChatsrecord component
-
canRestrictMembers
public boolean canRestrictMembers()Returns the value of thecanRestrictMembersrecord component.- Returns:
- the value of the
canRestrictMembersrecord component
-
canPromoteMembers
public boolean canPromoteMembers()Returns the value of thecanPromoteMembersrecord component.- Returns:
- the value of the
canPromoteMembersrecord 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
-
canPostMessages
public boolean canPostMessages()Returns the value of thecanPostMessagesrecord component.- Returns:
- the value of the
canPostMessagesrecord component
-
canEditMessages
public boolean canEditMessages()Returns the value of thecanEditMessagesrecord component.- Returns:
- the value of the
canEditMessagesrecord component
-
canPinMessages
public boolean canPinMessages()Returns the value of thecanPinMessagesrecord component.- Returns:
- the value of the
canPinMessagesrecord component
-
customTitle
Returns the value of thecustomTitlerecord component.- Returns:
- the value of the
customTitlerecord component
-