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

    Constructors
    Constructor
    Description
    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 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 canEditMessages 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 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 canPromoteMembers record component.
    boolean
    Returns the value of the canRestrictMembers record component.
    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.
    Returns the value of the status 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
  • 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 a ChatMemberAdministrator record class.
      Parameters:
      status - the value for the status record component
      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
      customTitle - the value for the customTitle record component
  • Method Details

    • 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.
    • status

      public String status()
      Returns the value of the status record component.
      Returns:
      the value of the status record component
    • user

      public User user()
      Returns the value of the user record component.
      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
    • customTitle

      public Optional<String> customTitle()
      Returns the value of the customTitle record component.
      Returns:
      the value of the customTitle record component