Record Class Link.PollData
java.lang.Object
java.lang.Record
io.github.yvasyliev.telegramforwarderbot.reddit.dto.Link.PollData
- Record Components:
predictionStatus- the status of the predictiontournamentId- the ID of the tournamentvotingEndTimestamp- the timestamp when voting endstotalVoteCount- the total number of votesvoteUpdatesRemained- the number of vote updates remainingisPrediction- indicates if this is a prediction pollresolvedOptionId- the ID of the resolved optionuserWonAmount- the amount won by the useruserSelection- the user's selection in the polloptions- the list of options in the polltotalStakeAmount- the total stake amount in the poll
- Enclosing class:
Link
public static record Link.PollData(String predictionStatus, String tournamentId, Instant votingEndTimestamp, Integer totalVoteCount, Integer voteUpdatesRemained, Boolean isPrediction, String resolvedOptionId, Double userWonAmount, String userSelection, List<Link.PollData.Option> options, Double totalStakeAmount)
extends Record
Represents the data for a Reddit poll.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordRepresents an option in a Reddit poll. -
Constructor Summary
ConstructorsConstructorDescriptionPollData(String predictionStatus, String tournamentId, Instant votingEndTimestamp, Integer totalVoteCount, Integer voteUpdatesRemained, Boolean isPrediction, String resolvedOptionId, Double userWonAmount, String userSelection, List<Link.PollData.Option> options, Double totalStakeAmount) Creates an instance of aPollDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theisPredictionrecord component.options()Returns the value of theoptionsrecord component.Returns the value of thepredictionStatusrecord component.Returns the value of theresolvedOptionIdrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetotalStakeAmountrecord component.Returns the value of thetotalVoteCountrecord component.Returns the value of thetournamentIdrecord component.Returns the value of theuserSelectionrecord component.Returns the value of theuserWonAmountrecord component.Returns the value of thevoteUpdatesRemainedrecord component.Returns the value of thevotingEndTimestamprecord component.
-
Constructor Details
-
PollData
public PollData(String predictionStatus, String tournamentId, Instant votingEndTimestamp, Integer totalVoteCount, Integer voteUpdatesRemained, Boolean isPrediction, String resolvedOptionId, Double userWonAmount, String userSelection, List<Link.PollData.Option> options, Double totalStakeAmount) Creates an instance of aPollDatarecord class.- Parameters:
predictionStatus- the value for thepredictionStatusrecord componenttournamentId- the value for thetournamentIdrecord componentvotingEndTimestamp- the value for thevotingEndTimestamprecord componenttotalVoteCount- the value for thetotalVoteCountrecord componentvoteUpdatesRemained- the value for thevoteUpdatesRemainedrecord componentisPrediction- the value for theisPredictionrecord componentresolvedOptionId- the value for theresolvedOptionIdrecord componentuserWonAmount- the value for theuserWonAmountrecord componentuserSelection- the value for theuserSelectionrecord componentoptions- the value for theoptionsrecord componenttotalStakeAmount- the value for thetotalStakeAmountrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
predictionStatus
Returns the value of thepredictionStatusrecord component.- Returns:
- the value of the
predictionStatusrecord component
-
tournamentId
Returns the value of thetournamentIdrecord component.- Returns:
- the value of the
tournamentIdrecord component
-
votingEndTimestamp
Returns the value of thevotingEndTimestamprecord component.- Returns:
- the value of the
votingEndTimestamprecord component
-
totalVoteCount
Returns the value of thetotalVoteCountrecord component.- Returns:
- the value of the
totalVoteCountrecord component
-
voteUpdatesRemained
Returns the value of thevoteUpdatesRemainedrecord component.- Returns:
- the value of the
voteUpdatesRemainedrecord component
-
isPrediction
Returns the value of theisPredictionrecord component.- Returns:
- the value of the
isPredictionrecord component
-
resolvedOptionId
Returns the value of theresolvedOptionIdrecord component.- Returns:
- the value of the
resolvedOptionIdrecord component
-
userWonAmount
Returns the value of theuserWonAmountrecord component.- Returns:
- the value of the
userWonAmountrecord component
-
userSelection
Returns the value of theuserSelectionrecord component.- Returns:
- the value of the
userSelectionrecord component
-
options
Returns the value of theoptionsrecord component.- Returns:
- the value of the
optionsrecord component
-
totalStakeAmount
Returns the value of thetotalStakeAmountrecord component.- Returns:
- the value of the
totalStakeAmountrecord component
-