Record Class ChatBoostSourceGiveaway
java.lang.Object
java.lang.Record
org.teleight.teleightbots.api.objects.ChatBoostSourceGiveaway
- All Implemented Interfaces:
Serializable,ApiResult,ChatBoostSource
public record ChatBoostSourceGiveaway(int giveawayMessageId, @Nullable User user, int prizeStarCount, boolean isUnclaimed)
extends Record
implements ChatBoostSource
- See Also:
-
Field Summary
Fields inherited from interface org.teleight.teleightbots.api.objects.ChatBoostSource
TYPE_NAME -
Constructor Summary
ConstructorsConstructorDescriptionChatBoostSourceGiveaway(int giveawayMessageId, @Nullable User user, int prizeStarCount, boolean isUnclaimed) Creates an instance of aChatBoostSourceGiveawayrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.intReturns the value of thegiveawayMessageIdrecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theisUnclaimedrecord component.intReturns the value of theprizeStarCountrecord component.source()final StringtoString()Returns a string representation of this record class.@Nullable Useruser()Returns the value of theuserrecord component.
-
Constructor Details
-
ChatBoostSourceGiveaway
public ChatBoostSourceGiveaway(int giveawayMessageId, @Nullable @Nullable User user, int prizeStarCount, boolean isUnclaimed) Creates an instance of aChatBoostSourceGiveawayrecord class.- Parameters:
giveawayMessageId- the value for thegiveawayMessageIdrecord componentuser- the value for theuserrecord componentprizeStarCount- the value for theprizeStarCountrecord componentisUnclaimed- the value for theisUnclaimedrecord component
-
-
Method Details
-
source
- Specified by:
sourcein interfaceChatBoostSource
-
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 '=='. -
giveawayMessageId
public int giveawayMessageId()Returns the value of thegiveawayMessageIdrecord component.- Returns:
- the value of the
giveawayMessageIdrecord component
-
user
Returns the value of theuserrecord component.- Returns:
- the value of the
userrecord component
-
prizeStarCount
public int prizeStarCount()Returns the value of theprizeStarCountrecord component.- Returns:
- the value of the
prizeStarCountrecord component
-
isUnclaimed
public boolean isUnclaimed()Returns the value of theisUnclaimedrecord component.- Returns:
- the value of the
isUnclaimedrecord component
-