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
-
Constructor Summary
ConstructorsConstructorDescriptionOwnedGiftRegular(@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 aOwnedGiftRegularrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thecanBeUpgradedrecord component.@Nullable IntegerReturns the value of theconvertStarCountrecord component.@Nullable MessageEntity[]entities()Returns the value of theentitiesrecord component.final booleanIndicates whether some other object is "equal to" this one.@NotNull Giftgift()Returns the value of thegiftrecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theisPrivaterecord component.booleanisSaved()Returns the value of theisSavedrecord component.booleanReturns the value of theisUpgradeSeparaterecord component.@Nullable StringReturns the value of theownedGiftIdrecord component.@Nullable IntegerReturns the value of theprepaidUpgradeStarCountrecord component.@NotNull DatesendDate()Returns the value of thesendDaterecord component.@Nullable UserReturns the value of thesenderUserrecord component.@Nullable Stringtext()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.type()intReturns the value of theuniqueGiftNumberrecord component.booleanReturns the value of thewasRefundedrecord component.
-
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 aOwnedGiftRegularrecord class.- Parameters:
gift- the value for thegiftrecord componentownedGiftId- the value for theownedGiftIdrecord componentsenderUser- the value for thesenderUserrecord componentsendDate- the value for thesendDaterecord componenttext- the value for thetextrecord componententities- the value for theentitiesrecord componentisPrivate- the value for theisPrivaterecord componentisSaved- the value for theisSavedrecord componentcanBeUpgraded- the value for thecanBeUpgradedrecord componentwasRefunded- the value for thewasRefundedrecord componentconvertStarCount- the value for theconvertStarCountrecord componentprepaidUpgradeStarCount- the value for theprepaidUpgradeStarCountrecord componentisUpgradeSeparate- the value for theisUpgradeSeparaterecord componentuniqueGiftNumber- the value for theuniqueGiftNumberrecord component
-
-
Method Details
-
type
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
gift
Returns the value of thegiftrecord component.- Returns:
- the value of the
giftrecord component
-
ownedGiftId
Returns the value of theownedGiftIdrecord component.- Returns:
- the value of the
ownedGiftIdrecord component
-
senderUser
Returns the value of thesenderUserrecord component.- Returns:
- the value of the
senderUserrecord component
-
sendDate
Returns the value of thesendDaterecord component.- Returns:
- the value of the
sendDaterecord component
-
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-
entities
Returns the value of theentitiesrecord component.- Returns:
- the value of the
entitiesrecord component
-
isPrivate
public boolean isPrivate()Returns the value of theisPrivaterecord component.- Returns:
- the value of the
isPrivaterecord component
-
isSaved
public boolean isSaved()Returns the value of theisSavedrecord component.- Returns:
- the value of the
isSavedrecord component
-
canBeUpgraded
public boolean canBeUpgraded()Returns the value of thecanBeUpgradedrecord component.- Returns:
- the value of the
canBeUpgradedrecord component
-
wasRefunded
public boolean wasRefunded()Returns the value of thewasRefundedrecord component.- Returns:
- the value of the
wasRefundedrecord component
-
convertStarCount
Returns the value of theconvertStarCountrecord component.- Returns:
- the value of the
convertStarCountrecord component
-
prepaidUpgradeStarCount
Returns the value of theprepaidUpgradeStarCountrecord component.- Returns:
- the value of the
prepaidUpgradeStarCountrecord component
-
isUpgradeSeparate
public boolean isUpgradeSeparate()Returns the value of theisUpgradeSeparaterecord component.- Returns:
- the value of the
isUpgradeSeparaterecord component
-
uniqueGiftNumber
public int uniqueGiftNumber()Returns the value of theuniqueGiftNumberrecord component.- Returns:
- the value of the
uniqueGiftNumberrecord component
-