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
ConstructorsConstructorDescriptionGiftInfo(@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 aGiftInforecord 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.booleanReturns the value of theisUpgradeSeparaterecord component.@Nullable StringReturns the value of theownedGiftIdrecord component.@Nullable IntegerReturns the value of theprepaidUpgradeStarCountrecord component.@Nullable Stringtext()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of theuniqueGiftNumberrecord component.
-
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 aGiftInforecord class.- Parameters:
gift- the value for thegiftrecord componentownedGiftId- the value for theownedGiftIdrecord componentconvertStarCount- the value for theconvertStarCountrecord componentprepaidUpgradeStarCount- the value for theprepaidUpgradeStarCountrecord componentisUpgradeSeparate- the value for theisUpgradeSeparaterecord componentcanBeUpgraded- the value for thecanBeUpgradedrecord componenttext- the value for thetextrecord componententities- the value for theentitiesrecord componentisPrivate- the value for theisPrivaterecord componentuniqueGiftNumber- the value for theuniqueGiftNumberrecord component
-
-
Method Details
-
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
-
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
-
canBeUpgraded
public boolean canBeUpgraded()Returns the value of thecanBeUpgradedrecord component.- Returns:
- the value of the
canBeUpgradedrecord 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
-
uniqueGiftNumber
public int uniqueGiftNumber()Returns the value of theuniqueGiftNumberrecord component.- Returns:
- the value of the
uniqueGiftNumberrecord component
-