Class PollChoice

java.lang.Object
com.github.twitch4j.eventsub.domain.PollChoice

public class PollChoice extends Object
  • Constructor Details

    • PollChoice

      public PollChoice()
    • PollChoice

      public PollChoice(String id, String title, @Nullable @Nullable Integer votes, @Nullable @Nullable Integer channelPointsVotes, @Nullable @Nullable Integer bitsVotes)
      Deprecated.
      Twitch no longer supports bits on polls.
      Creates a new PollChoice instance.
      Parameters:
      id - ID for the choice.
      title - Text displayed for the choice. Maximum: 25 characters.
      votes - Total number of votes received for the choice across all methods of voting.
      channelPointsVotes - Number of votes received via Channel Points.
      bitsVotes - Number of votes received via Bits.
  • Method Details

    • builder

      public static PollChoice.PollChoiceBuilder builder()
    • toBuilder

      public PollChoice.PollChoiceBuilder toBuilder()
    • withId

      public PollChoice withId(String id)
      ID for the choice.
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withTitle

      public PollChoice withTitle(String title)
      Text displayed for the choice. Maximum: 25 characters.
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withVotes

      public PollChoice withVotes(@Nullable @Nullable Integer votes)
      Total number of votes received for the choice across all methods of voting.
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withChannelPointsVotes

      public PollChoice withChannelPointsVotes(@Nullable @Nullable Integer channelPointsVotes)
      Number of votes received via Channel Points.
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withBitsVotes

      @Deprecated public PollChoice withBitsVotes(@Nullable @Nullable Integer bitsVotes)
      Deprecated.
      Twitch no longer supports bits on polls.
      Number of votes received via Bits.
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • getId

      public String getId()
      ID for the choice.
    • getTitle

      public String getTitle()
      Text displayed for the choice. Maximum: 25 characters.
    • getVotes

      @Nullable public @Nullable Integer getVotes()
      Total number of votes received for the choice across all methods of voting.
    • getChannelPointsVotes

      @Nullable public @Nullable Integer getChannelPointsVotes()
      Number of votes received via Channel Points.
    • getBitsVotes

      @Deprecated @Nullable public @Nullable Integer getBitsVotes()
      Deprecated.
      Twitch no longer supports bits on polls.
      Number of votes received via Bits.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object