Package com.github.twitch4j.helix.domain
Class Poll
java.lang.Object
com.github.twitch4j.helix.domain.Poll
public class Poll
extends java.lang.Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPoll.PollBuilder -
Constructor Summary
Constructors Constructor Description Poll()Poll(java.lang.String id, java.lang.String broadcasterId, java.lang.String broadcasterName, java.lang.String broadcasterLogin, java.lang.String title, java.util.List<com.github.twitch4j.eventsub.domain.PollChoice> choices, java.lang.Boolean isBitsVotingEnabled, java.lang.Integer bitsPerVote, java.lang.Boolean isChannelPointsVotingEnabled, java.lang.Integer channelPointsPerVote, com.github.twitch4j.eventsub.domain.PollStatus status, java.lang.Integer durationSeconds, java.time.Instant startedAt, @Nullable java.time.Instant endedAt) -
Method Summary
Modifier and Type Method Description static Poll.PollBuilderbuilder()protected booleancanEqual(java.lang.Object other)booleanequals(java.lang.Object o)java.lang.IntegergetBitsPerVote()Number of Bits required to vote once with Bits.java.lang.StringgetBroadcasterId()ID of the broadcaster.java.lang.StringgetBroadcasterLogin()Login name of the broadcaster.java.lang.StringgetBroadcasterName()Display name of the broadcaster.java.lang.IntegergetChannelPointsPerVote()Number of Channel Points required to vote once with Channel Points.java.util.List<com.github.twitch4j.eventsub.domain.PollChoice>getChoices()The poll choices.@Nullable java.time.DurationgetDuration()java.lang.IntegergetDurationSeconds()Total duration for the poll (in seconds).@Nullable java.time.InstantgetEndedAt()UTC timestamp for the poll’s start time.java.lang.StringgetId()ID of the poll.java.time.InstantgetStartedAt()UTC timestamp for the poll’s start time.com.github.twitch4j.eventsub.domain.PollStatusgetStatus()Poll status.java.lang.StringgetTitle()Question displayed for the poll.inthashCode()java.lang.BooleanisBitsVotingEnabled()Indicates whether Bits can be used for voting.java.lang.BooleanisChannelPointsVotingEnabled()Indicates whether Channel Points can be used for voting.Poll.PollBuildertoBuilder()java.lang.StringtoString()PollwithBitsPerVote(java.lang.Integer bitsPerVote)Number of Bits required to vote once with Bits.PollwithBroadcasterId(java.lang.String broadcasterId)ID of the broadcaster.PollwithBroadcasterLogin(java.lang.String broadcasterLogin)Login name of the broadcaster.PollwithBroadcasterName(java.lang.String broadcasterName)Display name of the broadcaster.PollwithChannelPointsPerVote(java.lang.Integer channelPointsPerVote)Number of Channel Points required to vote once with Channel Points.PollwithChoices(java.util.List<com.github.twitch4j.eventsub.domain.PollChoice> choices)The poll choices.PollwithDurationSeconds(java.lang.Integer durationSeconds)Total duration for the poll (in seconds).PollwithEndedAt(@Nullable java.time.Instant endedAt)UTC timestamp for the poll’s start time.PollwithId(java.lang.String id)ID of the poll.PollwithIsBitsVotingEnabled(java.lang.Boolean isBitsVotingEnabled)Indicates whether Bits can be used for voting.PollwithIsChannelPointsVotingEnabled(java.lang.Boolean isChannelPointsVotingEnabled)Indicates whether Channel Points can be used for voting.PollwithStartedAt(java.time.Instant startedAt)UTC timestamp for the poll’s start time.PollwithStatus(com.github.twitch4j.eventsub.domain.PollStatus status)Poll status.PollwithTitle(java.lang.String title)Question displayed for the poll.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
Poll
public Poll() -
Poll
public Poll(java.lang.String id, java.lang.String broadcasterId, java.lang.String broadcasterName, java.lang.String broadcasterLogin, java.lang.String title, java.util.List<com.github.twitch4j.eventsub.domain.PollChoice> choices, java.lang.Boolean isBitsVotingEnabled, java.lang.Integer bitsPerVote, java.lang.Boolean isChannelPointsVotingEnabled, java.lang.Integer channelPointsPerVote, com.github.twitch4j.eventsub.domain.PollStatus status, java.lang.Integer durationSeconds, java.time.Instant startedAt, @Nullable @Nullable java.time.Instant endedAt)
-
-
Method Details
-
getDuration
@Nullable public @Nullable java.time.Duration getDuration()- Returns:
- the total duration for the poll.
-
builder
-
toBuilder
-
withId
ID of the poll.- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withBroadcasterId
ID of the broadcaster.- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withBroadcasterName
Display name of the broadcaster.- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withBroadcasterLogin
Login name of the broadcaster.- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withTitle
Question displayed for the poll. Maximum: 60 characters.- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withChoices
The poll choices. Minimum: 2 choices. Maximum: 5 choices.- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withIsBitsVotingEnabled
Indicates whether Bits can be used for voting. Default: false.- Returns:
this.
-
withBitsPerVote
Number of Bits required to vote once with Bits. Minimum: 0. Maximum: 10000.- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withIsChannelPointsVotingEnabled
Indicates whether Channel Points can be used for voting. Default: false.- Returns:
this.
-
withChannelPointsPerVote
Number of Channel Points required to vote once with Channel Points. Minimum: 0. Maximum: 1000000.- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withStatus
Poll status.- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withDurationSeconds
Total duration for the poll (in seconds). Minimum: 15. Maximum: 1800.- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withStartedAt
UTC timestamp for the poll’s start time.- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withEndedAt
UTC timestamp for the poll’s start time.- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
getId
public java.lang.String getId()ID of the poll. -
getBroadcasterId
public java.lang.String getBroadcasterId()ID of the broadcaster. -
getBroadcasterName
public java.lang.String getBroadcasterName()Display name of the broadcaster. -
getBroadcasterLogin
public java.lang.String getBroadcasterLogin()Login name of the broadcaster. -
getTitle
public java.lang.String getTitle()Question displayed for the poll. Maximum: 60 characters. -
getChoices
public java.util.List<com.github.twitch4j.eventsub.domain.PollChoice> getChoices()The poll choices. Minimum: 2 choices. Maximum: 5 choices. -
isBitsVotingEnabled
public java.lang.Boolean isBitsVotingEnabled()Indicates whether Bits can be used for voting. Default: false. -
getBitsPerVote
public java.lang.Integer getBitsPerVote()Number of Bits required to vote once with Bits. Minimum: 0. Maximum: 10000. -
isChannelPointsVotingEnabled
public java.lang.Boolean isChannelPointsVotingEnabled()Indicates whether Channel Points can be used for voting. Default: false. -
getChannelPointsPerVote
public java.lang.Integer getChannelPointsPerVote()Number of Channel Points required to vote once with Channel Points. Minimum: 0. Maximum: 1000000. -
getStatus
public com.github.twitch4j.eventsub.domain.PollStatus getStatus()Poll status. -
getDurationSeconds
public java.lang.Integer getDurationSeconds()Total duration for the poll (in seconds). Minimum: 15. Maximum: 1800. -
getStartedAt
public java.time.Instant getStartedAt()UTC timestamp for the poll’s start time. -
getEndedAt
@Nullable public @Nullable java.time.Instant getEndedAt()UTC timestamp for the poll’s start time. -
equals
public boolean equals(java.lang.Object o)- Overrides:
equalsin classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other) -
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-