Record Class OwnedGiftUnique

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

public record OwnedGiftUnique(@NotNull UniqueGift gift, @Nullable String ownedGiftId, @Nullable User senderUser, @NotNull Date sendDate, boolean isSaved, boolean canBeTransferred, @Nullable Integer transferStarCount, @Nullable Date nextTransferDate) 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
    OwnedGiftUnique(@NotNull UniqueGift gift, @Nullable String ownedGiftId, @Nullable User senderUser, @NotNull Date sendDate, boolean isSaved, boolean canBeTransferred, @Nullable Integer transferStarCount, @Nullable Date nextTransferDate)
    Creates an instance of a OwnedGiftUnique record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns the value of the canBeTransferred record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    @NotNull UniqueGift
    Returns the value of the gift record component.
    final int
    Returns a hash code value for this object.
    boolean
    Returns the value of the isSaved record component.
    @Nullable Date
    Returns the value of the nextTransferDate record component.
    @Nullable String
    Returns the value of the ownedGiftId record component.
    @NotNull Date
    Returns the value of the sendDate record component.
    @Nullable User
    Returns the value of the senderUser record component.
    final String
    Returns a string representation of this record class.
    @Nullable Integer
    Returns the value of the transferStarCount record component.
     

    Methods inherited from class java.lang.Object

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

    • OwnedGiftUnique

      public OwnedGiftUnique(@NotNull @NotNull UniqueGift gift, @Nullable @Nullable String ownedGiftId, @Nullable @Nullable User senderUser, @NotNull @NotNull Date sendDate, boolean isSaved, boolean canBeTransferred, @Nullable @Nullable Integer transferStarCount, @Nullable @Nullable Date nextTransferDate)
      Creates an instance of a OwnedGiftUnique 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
      isSaved - the value for the isSaved record component
      canBeTransferred - the value for the canBeTransferred record component
      transferStarCount - the value for the transferStarCount record component
      nextTransferDate - the value for the nextTransferDate 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 UniqueGift 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
    • isSaved

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

      public boolean canBeTransferred()
      Returns the value of the canBeTransferred record component.
      Returns:
      the value of the canBeTransferred record component
    • transferStarCount

      @Nullable public @Nullable Integer transferStarCount()
      Returns the value of the transferStarCount record component.
      Returns:
      the value of the transferStarCount record component
    • nextTransferDate

      @Nullable public @Nullable Date nextTransferDate()
      Returns the value of the nextTransferDate record component.
      Returns:
      the value of the nextTransferDate record component