Record Class Giveaway
java.lang.Object
java.lang.Record
org.teleight.teleightbots.api.objects.Giveaway
- All Implemented Interfaces:
Serializable,ApiResult
public record Giveaway(@NotNull Chat[] chats, @NotNull Date winnersSelectionDate, int winnerCount, boolean onlyNewMembers, boolean hasPublicWinners, @Nullable String prizeDescription, @Nullable String[] countryCodes, int prizeStarCount, int premiumSubscriptionMonthCount)
extends Record
implements ApiResult
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionGiveaway(@NotNull Chat[] chats, @NotNull Date winnersSelectionDate, int winnerCount, boolean onlyNewMembers, boolean hasPublicWinners, @Nullable String prizeDescription, @Nullable String[] countryCodes, int prizeStarCount, int premiumSubscriptionMonthCount) Creates an instance of aGiveawayrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull Chat[]chats()Returns the value of thechatsrecord component.@Nullable String[]Returns the value of thecountryCodesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of thehasPublicWinnersrecord component.booleanReturns the value of theonlyNewMembersrecord component.intReturns the value of thepremiumSubscriptionMonthCountrecord component.@Nullable StringReturns the value of theprizeDescriptionrecord component.intReturns the value of theprizeStarCountrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of thewinnerCountrecord component.@NotNull DateReturns the value of thewinnersSelectionDaterecord component.
-
Constructor Details
-
Giveaway
public Giveaway(@NotNull @NotNull Chat[] chats, @NotNull @NotNull Date winnersSelectionDate, int winnerCount, boolean onlyNewMembers, boolean hasPublicWinners, @Nullable @Nullable String prizeDescription, @Nullable @Nullable String[] countryCodes, int prizeStarCount, int premiumSubscriptionMonthCount) Creates an instance of aGiveawayrecord class.- Parameters:
chats- the value for thechatsrecord componentwinnersSelectionDate- the value for thewinnersSelectionDaterecord componentwinnerCount- the value for thewinnerCountrecord componentonlyNewMembers- the value for theonlyNewMembersrecord componenthasPublicWinners- the value for thehasPublicWinnersrecord componentprizeDescription- the value for theprizeDescriptionrecord componentcountryCodes- the value for thecountryCodesrecord componentprizeStarCount- the value for theprizeStarCountrecord componentpremiumSubscriptionMonthCount- the value for thepremiumSubscriptionMonthCountrecord 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 '=='. -
chats
Returns the value of thechatsrecord component.- Returns:
- the value of the
chatsrecord component
-
winnersSelectionDate
Returns the value of thewinnersSelectionDaterecord component.- Returns:
- the value of the
winnersSelectionDaterecord component
-
winnerCount
public int winnerCount()Returns the value of thewinnerCountrecord component.- Returns:
- the value of the
winnerCountrecord component
-
onlyNewMembers
public boolean onlyNewMembers()Returns the value of theonlyNewMembersrecord component.- Returns:
- the value of the
onlyNewMembersrecord component
-
hasPublicWinners
public boolean hasPublicWinners()Returns the value of thehasPublicWinnersrecord component.- Returns:
- the value of the
hasPublicWinnersrecord component
-
prizeDescription
Returns the value of theprizeDescriptionrecord component.- Returns:
- the value of the
prizeDescriptionrecord component
-
countryCodes
Returns the value of thecountryCodesrecord component.- Returns:
- the value of the
countryCodesrecord component
-
prizeStarCount
public int prizeStarCount()Returns the value of theprizeStarCountrecord component.- Returns:
- the value of the
prizeStarCountrecord component
-