Record Class SetGameScore

java.lang.Object
java.lang.Record
org.teleight.teleightbots.api.methods.SetGameScore
All Implemented Interfaces:
ApiMethod<Serializable>, ApiMethodMultiResponse

public record SetGameScore(long userId, @org.checkerframework.common.value.qual.IntRange(from=0L) int score, boolean force, boolean disableEditMessage, @Nullable String chatId, int messageId, @Nullable String inlineMessageId) extends Record implements ApiMethodMultiResponse
  • Field Summary

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

    OBJECT_MAPPER
  • Constructor Summary

    Constructors
    Constructor
    Description
    SetGameScore(long userId, @org.checkerframework.common.value.qual.IntRange(from=0L) int score, boolean force, boolean disableEditMessage, @Nullable String chatId, int messageId, @Nullable String inlineMessageId)
    Creates an instance of a SetGameScore record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable String
    Returns the value of the chatId record component.
    boolean
    Returns the value of the disableEditMessage record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    boolean
    Returns the value of the force record component.
    @NotNull String
    Returns the endpoint URL for the Telegram Bot API method.
    @NotNull List<Class<? extends Serializable>>
    Retrieves the list of classes representing possible types for deserialization of the response.
    final int
    Returns a hash code value for this object.
    @Nullable String
    Returns the value of the inlineMessageId record component.
    int
    Returns the value of the messageId record component.
    static @NotNull lombok.Builder
    ofBuilder(long userId, @org.checkerframework.common.value.qual.IntRange(from=0L) int score)
     
    @org.checkerframework.common.value.qual.IntRange(from=0L) int
    Returns the value of the score record component.
    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.ApiMethodMultiResponse

    deserializeResponse, deserializeResponse
  • Constructor Details

    • SetGameScore

      public SetGameScore(long userId, @org.checkerframework.common.value.qual.IntRange(from=0L) int score, boolean force, boolean disableEditMessage, @Nullable @Nullable String chatId, int messageId, @Nullable @Nullable String inlineMessageId)
      Creates an instance of a SetGameScore record class.
      Parameters:
      userId - the value for the userId record component
      score - the value for the score record component
      force - the value for the force record component
      disableEditMessage - the value for the disableEditMessage record component
      chatId - the value for the chatId record component
      messageId - the value for the messageId record component
      inlineMessageId - the value for the inlineMessageId record component
  • Method Details

    • ofBuilder

      @NotNull public static @NotNull lombok.Builder ofBuilder(long userId, @org.checkerframework.common.value.qual.IntRange(from=0L) int score)
    • getSerializableClasses

      @NotNull public @NotNull List<Class<? extends Serializable>> getSerializableClasses()
      Description copied from interface: ApiMethodMultiResponse
      Retrieves the list of classes representing possible types for deserialization of the response.
      Specified by:
      getSerializableClasses in interface ApiMethodMultiResponse
      Returns:
      A List of classes extending Serializable.
    • 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<Serializable>
      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.
    • userId

      public long userId()
      Returns the value of the userId record component.
      Returns:
      the value of the userId record component
    • score

      public @org.checkerframework.common.value.qual.IntRange(from=0L) int score()
      Returns the value of the score record component.
      Returns:
      the value of the score record component
    • force

      public boolean force()
      Returns the value of the force record component.
      Returns:
      the value of the force record component
    • disableEditMessage

      public boolean disableEditMessage()
      Returns the value of the disableEditMessage record component.
      Returns:
      the value of the disableEditMessage record component
    • chatId

      @Nullable public @Nullable String chatId()
      Returns the value of the chatId record component.
      Returns:
      the value of the chatId record component
    • messageId

      public int messageId()
      Returns the value of the messageId record component.
      Returns:
      the value of the messageId record component
    • inlineMessageId

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