Record Class GiftInfo

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

public record GiftInfo(@NotNull Gift gift, @Nullable String ownedGiftId, @Nullable Integer convertStarCount, @Nullable Integer prepaidUpgradeStarCount, boolean isUpgradeSeparate, boolean canBeUpgraded, @Nullable String text, @Nullable MessageEntity[] entities, boolean isPrivate, int uniqueGiftNumber) extends Record implements ApiResult
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    GiftInfo(@NotNull Gift gift, @Nullable String ownedGiftId, @Nullable Integer convertStarCount, @Nullable Integer prepaidUpgradeStarCount, boolean isUpgradeSeparate, boolean canBeUpgraded, @Nullable String text, @Nullable MessageEntity[] entities, boolean isPrivate, int uniqueGiftNumber)
    Creates an instance of a GiftInfo record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns the value of the canBeUpgraded record component.
    @Nullable Integer
    Returns the value of the convertStarCount record component.
    @Nullable MessageEntity[]
    Returns the value of the entities record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    @NotNull Gift
    Returns the value of the gift record component.
    final int
    Returns a hash code value for this object.
    boolean
    Returns the value of the isPrivate record component.
    boolean
    Returns the value of the isUpgradeSeparate record component.
    @Nullable String
    Returns the value of the ownedGiftId record component.
    @Nullable Integer
    Returns the value of the prepaidUpgradeStarCount record component.
    @Nullable String
    Returns the value of the text record component.
    final String
    Returns a string representation of this record class.
    int
    Returns the value of the uniqueGiftNumber record component.

    Methods inherited from class java.lang.Object

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

    • GiftInfo

      public GiftInfo(@NotNull @NotNull Gift gift, @Nullable @Nullable String ownedGiftId, @Nullable @Nullable Integer convertStarCount, @Nullable @Nullable Integer prepaidUpgradeStarCount, boolean isUpgradeSeparate, boolean canBeUpgraded, @Nullable @Nullable String text, @Nullable @Nullable MessageEntity[] entities, boolean isPrivate, int uniqueGiftNumber)
      Creates an instance of a GiftInfo record class.
      Parameters:
      gift - the value for the gift record component
      ownedGiftId - the value for the ownedGiftId record component
      convertStarCount - the value for the convertStarCount record component
      prepaidUpgradeStarCount - the value for the prepaidUpgradeStarCount record component
      isUpgradeSeparate - the value for the isUpgradeSeparate record component
      canBeUpgraded - the value for the canBeUpgraded record component
      text - the value for the text record component
      entities - the value for the entities record component
      isPrivate - the value for the isPrivate record component
      uniqueGiftNumber - the value for the uniqueGiftNumber 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.
    • gift

      @NotNull public @NotNull Gift gift()
      Returns the value of the gift record component.
      Returns:
      the value of the gift record component
    • ownedGiftId

      @Nullable public @Nullable String ownedGiftId()
      Returns the value of the ownedGiftId record component.
      Returns:
      the value of the ownedGiftId record component
    • convertStarCount

      @Nullable public @Nullable Integer convertStarCount()
      Returns the value of the convertStarCount record component.
      Returns:
      the value of the convertStarCount record component
    • prepaidUpgradeStarCount

      @Nullable public @Nullable Integer prepaidUpgradeStarCount()
      Returns the value of the prepaidUpgradeStarCount record component.
      Returns:
      the value of the prepaidUpgradeStarCount record component
    • isUpgradeSeparate

      public boolean isUpgradeSeparate()
      Returns the value of the isUpgradeSeparate record component.
      Returns:
      the value of the isUpgradeSeparate record component
    • canBeUpgraded

      public boolean canBeUpgraded()
      Returns the value of the canBeUpgraded record component.
      Returns:
      the value of the canBeUpgraded record component
    • text

      @Nullable public @Nullable String text()
      Returns the value of the text record component.
      Returns:
      the value of the text record component
    • entities

      @Nullable public @Nullable MessageEntity[] entities()
      Returns the value of the entities record component.
      Returns:
      the value of the entities record component
    • isPrivate

      public boolean isPrivate()
      Returns the value of the isPrivate record component.
      Returns:
      the value of the isPrivate record component
    • uniqueGiftNumber

      public int uniqueGiftNumber()
      Returns the value of the uniqueGiftNumber record component.
      Returns:
      the value of the uniqueGiftNumber record component