Record Class PromoteChatMember

java.lang.Object
java.lang.Record
org.teleight.teleightbots.api.methods.PromoteChatMember
All Implemented Interfaces:
ApiMethod<Boolean>, ApiMethodBoolean

public record PromoteChatMember(@NotNull String chatId, long userId, boolean isAnonymous, boolean canManageChat, boolean canDeleteMessages, boolean canManageVideoChats, boolean canRestrictMembers, boolean canPromoteMembers, boolean canChangeInfo, boolean canInviteUsers, boolean canPostMessages, boolean canEditMessages, boolean canPinMessages, boolean canPostStories, boolean canEditStories, boolean canDeleteStories, boolean canManageTopics, boolean canManageDirectMessages) extends Record implements ApiMethodBoolean
  • Field Summary

    Fields inherited from interface org.teleight.teleightbots.api.ApiMethod

    OBJECT_MAPPER
  • Constructor Summary

    Constructors
    Constructor
    Description
    PromoteChatMember(@NotNull String chatId, long userId, boolean isAnonymous, boolean canManageChat, boolean canDeleteMessages, boolean canManageVideoChats, boolean canRestrictMembers, boolean canPromoteMembers, boolean canChangeInfo, boolean canInviteUsers, boolean canPostMessages, boolean canEditMessages, boolean canPinMessages, boolean canPostStories, boolean canEditStories, boolean canDeleteStories, boolean canManageTopics, boolean canManageDirectMessages)
    Creates an instance of a PromoteChatMember record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    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 canManageVideoChats 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.
    @NotNull String
    Returns the value of the chatId record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    @NotNull String
    Returns the endpoint URL for the Telegram Bot API method.
    final int
    Returns a hash code value for this object.
    boolean
    Returns the value of the isAnonymous record component.
    static @NotNull lombok.Builder
    ofBuilder(String chatId, long userId)
     
    final String
    Returns a string representation of this record class.
    long
    Returns the value of the userId 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.ApiMethod

    deserializeResponse, deserializeResponseArray, deserializeResponseSerializable

    Methods inherited from interface org.teleight.teleightbots.api.ApiMethodBoolean

    deserializeResponse
  • Constructor Details

    • PromoteChatMember

      public PromoteChatMember(@NotNull @NotNull String chatId, long userId, boolean isAnonymous, boolean canManageChat, boolean canDeleteMessages, boolean canManageVideoChats, boolean canRestrictMembers, boolean canPromoteMembers, boolean canChangeInfo, boolean canInviteUsers, boolean canPostMessages, boolean canEditMessages, boolean canPinMessages, boolean canPostStories, boolean canEditStories, boolean canDeleteStories, boolean canManageTopics, boolean canManageDirectMessages)
      Creates an instance of a PromoteChatMember record class.
      Parameters:
      chatId - the value for the chatId record component
      userId - the value for the userId 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
      canManageVideoChats - the value for the canManageVideoChats 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
  • Method Details

    • ofBuilder

      @NotNull public static @NotNull lombok.Builder ofBuilder(String chatId, long userId)
    • getEndpointURL

      @NotNull public @NotNull String getEndpointURL()
      Description copied from interface: ApiMethod
      Returns the endpoint URL for the Telegram Bot API method.
      Specified by:
      getEndpointURL in interface ApiMethod<Boolean>
      Returns:
      the endpoint URL
    • 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.
    • chatId

      @NotNull public @NotNull String chatId()
      Returns the value of the chatId record component.
      Returns:
      the value of the chatId record component
    • userId

      public long userId()
      Returns the value of the userId record component.
      Returns:
      the value of the userId 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
    • canManageVideoChats

      public boolean canManageVideoChats()
      Returns the value of the canManageVideoChats record component.
      Returns:
      the value of the canManageVideoChats 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