Record Class ChatMemberAdministrator
java.lang.Object
java.lang.Record
org.teleight.teleightbots.api.objects.ChatMemberAdministrator
- All Implemented Interfaces:
Serializable,ApiResult,ChatMember
public record ChatMemberAdministrator(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, boolean canPostStories, boolean canEditStories, boolean canDeleteStories, boolean canManageTopics, boolean canManageDirectMessages, @Nullable String customTitle)
extends Record
implements ChatMember
- See Also:
-
Field Summary
Fields inherited from interface org.teleight.teleightbots.api.objects.ChatMember
TYPE_NAME -
Constructor Summary
ConstructorsConstructorDescriptionChatMemberAdministrator(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, boolean canPostStories, boolean canEditStories, boolean canDeleteStories, boolean canManageTopics, boolean canManageDirectMessages, @Nullable 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 thecanDeleteStoriesrecord component.booleanReturns the value of thecanEditMessagesrecord component.booleanReturns the value of thecanEditStoriesrecord component.booleanReturns the value of thecanInviteUsersrecord component.booleanReturns the value of thecanManageChatrecord component.booleanReturns the value of thecanManageDirectMessagesrecord component.booleanReturns the value of thecanManageTopicsrecord component.booleanReturns the value of thecanManageVoiceChatsrecord component.booleanReturns the value of thecanPinMessagesrecord component.booleanReturns the value of thecanPostMessagesrecord component.booleanReturns the value of thecanPostStoriesrecord component.booleanReturns the value of thecanPromoteMembersrecord component.booleanReturns the value of thecanRestrictMembersrecord component.@Nullable StringReturns 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()final StringtoString()Returns a string representation of this record class.user()Returns the value of theuserrecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.teleight.teleightbots.api.objects.ChatMember
isAdmin
-
Constructor Details
-
ChatMemberAdministrator
public ChatMemberAdministrator(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, boolean canPostStories, boolean canEditStories, boolean canDeleteStories, boolean canManageTopics, boolean canManageDirectMessages, @Nullable @Nullable String customTitle) Creates an instance of aChatMemberAdministratorrecord class.- Parameters:
user- 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 componentcanPostStories- the value for thecanPostStoriesrecord componentcanEditStories- the value for thecanEditStoriesrecord componentcanDeleteStories- the value for thecanDeleteStoriesrecord componentcanManageTopics- the value for thecanManageTopicsrecord componentcanManageDirectMessages- the value for thecanManageDirectMessagesrecord componentcustomTitle- the value for thecustomTitlerecord component
-
-
Method Details
-
status
- Specified by:
statusin interfaceChatMember
-
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 '=='. -
user
Returns the value of theuserrecord component.- Specified by:
userin interfaceChatMember- 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
-
canPostStories
public boolean canPostStories()Returns the value of thecanPostStoriesrecord component.- Returns:
- the value of the
canPostStoriesrecord component
-
canEditStories
public boolean canEditStories()Returns the value of thecanEditStoriesrecord component.- Returns:
- the value of the
canEditStoriesrecord component
-
canDeleteStories
public boolean canDeleteStories()Returns the value of thecanDeleteStoriesrecord component.- Returns:
- the value of the
canDeleteStoriesrecord component
-
canManageTopics
public boolean canManageTopics()Returns the value of thecanManageTopicsrecord component.- Returns:
- the value of the
canManageTopicsrecord component
-
canManageDirectMessages
public boolean canManageDirectMessages()Returns the value of thecanManageDirectMessagesrecord component.- Returns:
- the value of the
canManageDirectMessagesrecord component
-
customTitle
Returns the value of thecustomTitlerecord component.- Returns:
- the value of the
customTitlerecord component
-