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 record
Represents 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 aPollData
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of theisPrediction
record component.options()
Returns the value of theoptions
record component.Returns the value of thepredictionStatus
record component.Returns the value of theresolvedOptionId
record component.final String
toString()
Returns a string representation of this record class.Returns the value of thetotalStakeAmount
record component.Returns the value of thetotalVoteCount
record component.Returns the value of thetournamentId
record component.Returns the value of theuserSelection
record component.Returns the value of theuserWonAmount
record component.Returns the value of thevoteUpdatesRemained
record component.Returns the value of thevotingEndTimestamp
record 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 aPollData
record class.- Parameters:
predictionStatus
- the value for thepredictionStatus
record componenttournamentId
- the value for thetournamentId
record componentvotingEndTimestamp
- the value for thevotingEndTimestamp
record componenttotalVoteCount
- the value for thetotalVoteCount
record componentvoteUpdatesRemained
- the value for thevoteUpdatesRemained
record componentisPrediction
- the value for theisPrediction
record componentresolvedOptionId
- the value for theresolvedOptionId
record componentuserWonAmount
- the value for theuserWonAmount
record componentuserSelection
- the value for theuserSelection
record componentoptions
- the value for theoptions
record componenttotalStakeAmount
- the value for thetotalStakeAmount
record 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 thepredictionStatus
record component.- Returns:
- the value of the
predictionStatus
record component
-
tournamentId
Returns the value of thetournamentId
record component.- Returns:
- the value of the
tournamentId
record component
-
votingEndTimestamp
Returns the value of thevotingEndTimestamp
record component.- Returns:
- the value of the
votingEndTimestamp
record component
-
totalVoteCount
Returns the value of thetotalVoteCount
record component.- Returns:
- the value of the
totalVoteCount
record component
-
voteUpdatesRemained
Returns the value of thevoteUpdatesRemained
record component.- Returns:
- the value of the
voteUpdatesRemained
record component
-
isPrediction
Returns the value of theisPrediction
record component.- Returns:
- the value of the
isPrediction
record component
-
resolvedOptionId
Returns the value of theresolvedOptionId
record component.- Returns:
- the value of the
resolvedOptionId
record component
-
userWonAmount
Returns the value of theuserWonAmount
record component.- Returns:
- the value of the
userWonAmount
record component
-
userSelection
Returns the value of theuserSelection
record component.- Returns:
- the value of the
userSelection
record component
-
options
Returns the value of theoptions
record component.- Returns:
- the value of the
options
record component
-
totalStakeAmount
Returns the value of thetotalStakeAmount
record component.- Returns:
- the value of the
totalStakeAmount
record component
-