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 prediction
tournamentId - the ID of the tournament
votingEndTimestamp - the timestamp when voting ends
totalVoteCount - the total number of votes
voteUpdatesRemained - the number of vote updates remaining
isPrediction - indicates if this is a prediction poll
resolvedOptionId - the ID of the resolved option
userWonAmount - the amount won by the user
userSelection - the user's selection in the poll
options - the list of options in the poll
totalStakeAmount - 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.
  • Constructor Details

  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • predictionStatus

      public String predictionStatus()
      Returns the value of the predictionStatus record component.
      Returns:
      the value of the predictionStatus record component
    • tournamentId

      public String tournamentId()
      Returns the value of the tournamentId record component.
      Returns:
      the value of the tournamentId record component
    • votingEndTimestamp

      public Instant votingEndTimestamp()
      Returns the value of the votingEndTimestamp record component.
      Returns:
      the value of the votingEndTimestamp record component
    • totalVoteCount

      public Integer totalVoteCount()
      Returns the value of the totalVoteCount record component.
      Returns:
      the value of the totalVoteCount record component
    • voteUpdatesRemained

      public Integer voteUpdatesRemained()
      Returns the value of the voteUpdatesRemained record component.
      Returns:
      the value of the voteUpdatesRemained record component
    • isPrediction

      public Boolean isPrediction()
      Returns the value of the isPrediction record component.
      Returns:
      the value of the isPrediction record component
    • resolvedOptionId

      public String resolvedOptionId()
      Returns the value of the resolvedOptionId record component.
      Returns:
      the value of the resolvedOptionId record component
    • userWonAmount

      public Double userWonAmount()
      Returns the value of the userWonAmount record component.
      Returns:
      the value of the userWonAmount record component
    • userSelection

      public String userSelection()
      Returns the value of the userSelection record component.
      Returns:
      the value of the userSelection record component
    • options

      public List<Link.PollData.Option> options()
      Returns the value of the options record component.
      Returns:
      the value of the options record component
    • totalStakeAmount

      public Double totalStakeAmount()
      Returns the value of the totalStakeAmount record component.
      Returns:
      the value of the totalStakeAmount record component