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

    Constructors
    Constructor
    Description
    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)
    Creates an instance of a ChatMemberAdministrator record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns the value of the canBeEdited record component.
    boolean
    Returns the value of the canChangeInfo record component.
    boolean
    Returns the value of the canDeleteMessages record component.
    boolean
    Returns the value of the canDeleteStories record component.
    boolean
    Returns the value of the canEditMessages record component.
    boolean
    Returns the value of the canEditStories record component.
    boolean
    Returns the value of the canInviteUsers record component.
    boolean
    Returns the value of the canManageChat record component.
    boolean
    Returns the value of the canManageDirectMessages record component.
    boolean
    Returns the value of the canManageTopics record component.
    boolean
    Returns the value of the canManageVoiceChats record component.
    boolean
    Returns the value of the canPinMessages record component.
    boolean
    Returns the value of the canPostMessages record component.
    boolean
    Returns the value of the canPostStories record component.
    boolean
    Returns the value of the canPromoteMembers record component.
    boolean
    Returns the value of the canRestrictMembers record component.
    @Nullable String
    Returns the value of the customTitle record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    boolean
    Returns the value of the isAnonymous record component.
     
    final String
    Returns a string representation of this record class.
    Returns the value of the user record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods 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 a ChatMemberAdministrator record class.
      Parameters:
      user - the value for the user record component
      canBeEdited - the value for the canBeEdited record component
      isAnonymous - the value for the isAnonymous record component
      canManageChat - the value for the canManageChat record component
      canDeleteMessages - the value for the canDeleteMessages record component
      canManageVoiceChats - the value for the canManageVoiceChats record component
      canRestrictMembers - the value for the canRestrictMembers record component
      canPromoteMembers - the value for the canPromoteMembers record component
      canChangeInfo - the value for the canChangeInfo record component
      canInviteUsers - the value for the canInviteUsers record component
      canPostMessages - the value for the canPostMessages record component
      canEditMessages - the value for the canEditMessages record component
      canPinMessages - the value for the canPinMessages record component
      canPostStories - the value for the canPostStories record component
      canEditStories - the value for the canEditStories record component
      canDeleteStories - the value for the canDeleteStories record component
      canManageTopics - the value for the canManageTopics record component
      canManageDirectMessages - the value for the canManageDirectMessages record component
      customTitle - the value for the customTitle record component
  • Method Details

    • status

      public String status()
      Specified by:
      status in interface ChatMember
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • user

      public User user()
      Returns the value of the user record component.
      Specified by:
      user in interface ChatMember
      Returns:
      the value of the user record component
    • canBeEdited

      public boolean canBeEdited()
      Returns the value of the canBeEdited record component.
      Returns:
      the value of the canBeEdited record component
    • isAnonymous

      public boolean isAnonymous()
      Returns the value of the isAnonymous record component.
      Returns:
      the value of the isAnonymous record component
    • canManageChat

      public boolean canManageChat()
      Returns the value of the canManageChat record component.
      Returns:
      the value of the canManageChat record component
    • canDeleteMessages

      public boolean canDeleteMessages()
      Returns the value of the canDeleteMessages record component.
      Returns:
      the value of the canDeleteMessages record component
    • canManageVoiceChats

      public boolean canManageVoiceChats()
      Returns the value of the canManageVoiceChats record component.
      Returns:
      the value of the canManageVoiceChats record component
    • canRestrictMembers

      public boolean canRestrictMembers()
      Returns the value of the canRestrictMembers record component.
      Returns:
      the value of the canRestrictMembers record component
    • canPromoteMembers

      public boolean canPromoteMembers()
      Returns the value of the canPromoteMembers record component.
      Returns:
      the value of the canPromoteMembers record component
    • canChangeInfo

      public boolean canChangeInfo()
      Returns the value of the canChangeInfo record component.
      Returns:
      the value of the canChangeInfo record component
    • canInviteUsers

      public boolean canInviteUsers()
      Returns the value of the canInviteUsers record component.
      Returns:
      the value of the canInviteUsers record component
    • canPostMessages

      public boolean canPostMessages()
      Returns the value of the canPostMessages record component.
      Returns:
      the value of the canPostMessages record component
    • canEditMessages

      public boolean canEditMessages()
      Returns the value of the canEditMessages record component.
      Returns:
      the value of the canEditMessages record component
    • canPinMessages

      public boolean canPinMessages()
      Returns the value of the canPinMessages record component.
      Returns:
      the value of the canPinMessages record component
    • canPostStories

      public boolean canPostStories()
      Returns the value of the canPostStories record component.
      Returns:
      the value of the canPostStories record component
    • canEditStories

      public boolean canEditStories()
      Returns the value of the canEditStories record component.
      Returns:
      the value of the canEditStories record component
    • canDeleteStories

      public boolean canDeleteStories()
      Returns the value of the canDeleteStories record component.
      Returns:
      the value of the canDeleteStories record component
    • canManageTopics

      public boolean canManageTopics()
      Returns the value of the canManageTopics record component.
      Returns:
      the value of the canManageTopics record component
    • canManageDirectMessages

      public boolean canManageDirectMessages()
      Returns the value of the canManageDirectMessages record component.
      Returns:
      the value of the canManageDirectMessages record component
    • customTitle

      @Nullable public @Nullable String customTitle()
      Returns the value of the customTitle record component.
      Returns:
      the value of the customTitle record component