Record Class OwnedGiftRegular

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

public record OwnedGiftRegular(@NotNull Gift gift, @Nullable String ownedGiftId, @Nullable User senderUser, @NotNull Date sendDate, @Nullable String text, @Nullable MessageEntity[] entities, boolean isPrivate, boolean isSaved, boolean canBeUpgraded, boolean wasRefunded, @Nullable Integer convertStarCount, @Nullable Integer prepaidUpgradeStarCount, boolean isUpgradeSeparate, int uniqueGiftNumber) extends Record implements OwnedGift
See Also:
  • Field Summary

    Fields inherited from interface org.teleight.teleightbots.api.objects.OwnedGift

    TYPE_NAME
  • Constructor Summary

    Constructors
    Constructor
    Description
    OwnedGiftRegular(@NotNull Gift gift, @Nullable String ownedGiftId, @Nullable User senderUser, @NotNull Date sendDate, @Nullable String text, @Nullable MessageEntity[] entities, boolean isPrivate, boolean isSaved, boolean canBeUpgraded, boolean wasRefunded, @Nullable Integer convertStarCount, @Nullable Integer prepaidUpgradeStarCount, boolean isUpgradeSeparate, int uniqueGiftNumber)
    Creates an instance of a OwnedGiftRegular 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 isSaved 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.
    @NotNull Date
    Returns the value of the sendDate record component.
    @Nullable User
    Returns the value of the senderUser 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.
    boolean
    Returns the value of the wasRefunded record component.

    Methods inherited from class java.lang.Object

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

    • OwnedGiftRegular

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

    • type

      public String type()
      Specified by:
      type in interface OwnedGift
    • 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
    • senderUser

      @Nullable public @Nullable User senderUser()
      Returns the value of the senderUser record component.
      Returns:
      the value of the senderUser record component
    • sendDate

      @NotNull public @NotNull Date sendDate()
      Returns the value of the sendDate record component.
      Returns:
      the value of the sendDate 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
    • isSaved

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

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

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

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