Record Class Gift

java.lang.Object
java.lang.Record
org.teleight.teleightbots.api.objects.Gift
All Implemented Interfaces:
Serializable, ApiResult

public record Gift(@NotNull String id, @NotNull Sticker sticker, int starCount, int upgradeStarCount, boolean isPremium, boolean hasColors, int totalCount, int remainingCount, int personalTotalCount, int personalRemainingCount, @Nullable GiftBackground background, int uniqueGiftVariantCount, @Nullable Chat publisherChat) extends Record implements ApiResult
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Gift(@NotNull String id, @NotNull Sticker sticker, int starCount, int upgradeStarCount, boolean isPremium, boolean hasColors, int totalCount, int remainingCount, int personalTotalCount, int personalRemainingCount, @Nullable GiftBackground background, int uniqueGiftVariantCount, @Nullable Chat publisherChat)
    Creates an instance of a Gift record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable GiftBackground
    Returns the value of the background record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    boolean
    Returns the value of the hasColors record component.
    final int
    Returns a hash code value for this object.
    @NotNull String
    id()
    Returns the value of the id record component.
    boolean
    Returns the value of the isPremium record component.
    int
    Returns the value of the personalRemainingCount record component.
    int
    Returns the value of the personalTotalCount record component.
    @Nullable Chat
    Returns the value of the publisherChat record component.
    int
    Returns the value of the remainingCount record component.
    int
    Returns the value of the starCount record component.
    @NotNull Sticker
    Returns the value of the sticker record component.
    final String
    Returns a string representation of this record class.
    int
    Returns the value of the totalCount record component.
    int
    Returns the value of the uniqueGiftVariantCount record component.
    int
    Returns the value of the upgradeStarCount record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Gift

      public Gift(@NotNull @NotNull String id, @NotNull @NotNull Sticker sticker, int starCount, int upgradeStarCount, boolean isPremium, boolean hasColors, int totalCount, int remainingCount, int personalTotalCount, int personalRemainingCount, @Nullable @Nullable GiftBackground background, int uniqueGiftVariantCount, @Nullable @Nullable Chat publisherChat)
      Creates an instance of a Gift record class.
      Parameters:
      id - the value for the id record component
      sticker - the value for the sticker record component
      starCount - the value for the starCount record component
      upgradeStarCount - the value for the upgradeStarCount record component
      isPremium - the value for the isPremium record component
      hasColors - the value for the hasColors record component
      totalCount - the value for the totalCount record component
      remainingCount - the value for the remainingCount record component
      personalTotalCount - the value for the personalTotalCount record component
      personalRemainingCount - the value for the personalRemainingCount record component
      background - the value for the background record component
      uniqueGiftVariantCount - the value for the uniqueGiftVariantCount record component
      publisherChat - the value for the publisherChat 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.
    • id

      @NotNull public @NotNull String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • sticker

      @NotNull public @NotNull Sticker sticker()
      Returns the value of the sticker record component.
      Returns:
      the value of the sticker record component
    • starCount

      public int starCount()
      Returns the value of the starCount record component.
      Returns:
      the value of the starCount record component
    • upgradeStarCount

      public int upgradeStarCount()
      Returns the value of the upgradeStarCount record component.
      Returns:
      the value of the upgradeStarCount record component
    • isPremium

      public boolean isPremium()
      Returns the value of the isPremium record component.
      Returns:
      the value of the isPremium record component
    • hasColors

      public boolean hasColors()
      Returns the value of the hasColors record component.
      Returns:
      the value of the hasColors record component
    • totalCount

      public int totalCount()
      Returns the value of the totalCount record component.
      Returns:
      the value of the totalCount record component
    • remainingCount

      public int remainingCount()
      Returns the value of the remainingCount record component.
      Returns:
      the value of the remainingCount record component
    • personalTotalCount

      public int personalTotalCount()
      Returns the value of the personalTotalCount record component.
      Returns:
      the value of the personalTotalCount record component
    • personalRemainingCount

      public int personalRemainingCount()
      Returns the value of the personalRemainingCount record component.
      Returns:
      the value of the personalRemainingCount record component
    • background

      @Nullable public @Nullable GiftBackground background()
      Returns the value of the background record component.
      Returns:
      the value of the background record component
    • uniqueGiftVariantCount

      public int uniqueGiftVariantCount()
      Returns the value of the uniqueGiftVariantCount record component.
      Returns:
      the value of the uniqueGiftVariantCount record component
    • publisherChat

      @Nullable public @Nullable Chat publisherChat()
      Returns the value of the publisherChat record component.
      Returns:
      the value of the publisherChat record component