Record Class Gift
java.lang.Object
java.lang.Record
org.teleight.teleightbots.api.objects.Gift
- All Implemented Interfaces:
Serializable,ApiResult
public record Gift(@NotNull String id, @NotNull Sticker sticker, int starCount, int upgradeStarCount, boolean isPremium, boolean hasColors, int totalCount, int remainingCount, int personalTotalCount, int personalRemainingCount, @Nullable GiftBackground background, int uniqueGiftVariantCount, @Nullable Chat publisherChat)
extends Record
implements ApiResult
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionGift(@NotNull String id, @NotNull Sticker sticker, int starCount, int upgradeStarCount, boolean isPremium, boolean hasColors, int totalCount, int remainingCount, int personalTotalCount, int personalRemainingCount, @Nullable GiftBackground background, int uniqueGiftVariantCount, @Nullable Chat publisherChat) Creates an instance of aGiftrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable GiftBackgroundReturns the value of thebackgroundrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of thehasColorsrecord component.final inthashCode()Returns a hash code value for this object.@NotNull Stringid()Returns the value of theidrecord component.booleanReturns the value of theisPremiumrecord component.intReturns the value of thepersonalRemainingCountrecord component.intReturns the value of thepersonalTotalCountrecord component.@Nullable ChatReturns the value of thepublisherChatrecord component.intReturns the value of theremainingCountrecord component.intReturns the value of thestarCountrecord component.@NotNull Stickersticker()Returns the value of thestickerrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of thetotalCountrecord component.intReturns the value of theuniqueGiftVariantCountrecord component.intReturns the value of theupgradeStarCountrecord component.
-
Constructor Details
-
Gift
public Gift(@NotNull @NotNull String id, @NotNull @NotNull Sticker sticker, int starCount, int upgradeStarCount, boolean isPremium, boolean hasColors, int totalCount, int remainingCount, int personalTotalCount, int personalRemainingCount, @Nullable @Nullable GiftBackground background, int uniqueGiftVariantCount, @Nullable @Nullable Chat publisherChat) Creates an instance of aGiftrecord class.- Parameters:
id- the value for theidrecord componentsticker- the value for thestickerrecord componentstarCount- the value for thestarCountrecord componentupgradeStarCount- the value for theupgradeStarCountrecord componentisPremium- the value for theisPremiumrecord componenthasColors- the value for thehasColorsrecord componenttotalCount- the value for thetotalCountrecord componentremainingCount- the value for theremainingCountrecord componentpersonalTotalCount- the value for thepersonalTotalCountrecord componentpersonalRemainingCount- the value for thepersonalRemainingCountrecord componentbackground- the value for thebackgroundrecord componentuniqueGiftVariantCount- the value for theuniqueGiftVariantCountrecord componentpublisherChat- the value for thepublisherChatrecord 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 '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
sticker
Returns the value of thestickerrecord component.- Returns:
- the value of the
stickerrecord component
-
starCount
public int starCount()Returns the value of thestarCountrecord component.- Returns:
- the value of the
starCountrecord component
-
upgradeStarCount
public int upgradeStarCount()Returns the value of theupgradeStarCountrecord component.- Returns:
- the value of the
upgradeStarCountrecord component
-
isPremium
public boolean isPremium()Returns the value of theisPremiumrecord component.- Returns:
- the value of the
isPremiumrecord component
-
hasColors
public boolean hasColors()Returns the value of thehasColorsrecord component.- Returns:
- the value of the
hasColorsrecord component
-
totalCount
public int totalCount()Returns the value of thetotalCountrecord component.- Returns:
- the value of the
totalCountrecord component
-
remainingCount
public int remainingCount()Returns the value of theremainingCountrecord component.- Returns:
- the value of the
remainingCountrecord component
-
personalTotalCount
public int personalTotalCount()Returns the value of thepersonalTotalCountrecord component.- Returns:
- the value of the
personalTotalCountrecord component
-
personalRemainingCount
public int personalRemainingCount()Returns the value of thepersonalRemainingCountrecord component.- Returns:
- the value of the
personalRemainingCountrecord component
-
background
Returns the value of thebackgroundrecord component.- Returns:
- the value of the
backgroundrecord component
-
uniqueGiftVariantCount
public int uniqueGiftVariantCount()Returns the value of theuniqueGiftVariantCountrecord component.- Returns:
- the value of the
uniqueGiftVariantCountrecord component
-
publisherChat
Returns the value of thepublisherChatrecord component.- Returns:
- the value of the
publisherChatrecord component
-