Package com.github.twitch4j.helix.domain
Class Prediction.PredictionBuilder
java.lang.Object
com.github.twitch4j.helix.domain.Prediction.PredictionBuilder
- Enclosing class:
- Prediction
public static class Prediction.PredictionBuilder
extends java.lang.Object
-
Method Summary
Modifier and Type Method Description Prediction.PredictionBuilderbroadcasterId(java.lang.String broadcasterId)ID of the broadcaster.Prediction.PredictionBuilderbroadcasterLogin(java.lang.String broadcasterLogin)Login name of the broadcaster.Prediction.PredictionBuilderbroadcasterName(java.lang.String broadcasterName)Display name of the broadcaster.Predictionbuild()Prediction.PredictionBuilderclearOutcomes()Prediction.PredictionBuildercreatedAt(java.time.Instant createdAt)UTC timestamp for the Prediction’s start time.Prediction.PredictionBuilderendedAt(@Nullable java.time.Instant endedAt)UTC timestamp for when the Prediction ended.Prediction.PredictionBuilderid(java.lang.String id)ID of the Prediction.Prediction.PredictionBuilderlockedAt(@Nullable java.time.Instant lockedAt)UTC timestamp for when the Prediction was locked.Prediction.PredictionBuilderoutcome(com.github.twitch4j.eventsub.domain.PredictionOutcome outcome)Prediction.PredictionBuilderoutcomes(java.util.Collection<? extends com.github.twitch4j.eventsub.domain.PredictionOutcome> outcomes)Prediction.PredictionBuilderpredictionWindowSeconds(java.lang.Integer predictionWindowSeconds)Total duration for the Prediction (in seconds).Prediction.PredictionBuilderstatus(com.github.twitch4j.eventsub.domain.PredictionStatus status)Status of the Prediction.Prediction.PredictionBuildertitle(java.lang.String title)Title for the Prediction.java.lang.StringtoString()Prediction.PredictionBuilderwinningOutcomeId(@Nullable java.lang.String winningOutcomeId)ID of the winning outcome.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Method Details
-
id
ID of the Prediction.- Returns:
this.
-
broadcasterId
ID of the broadcaster.- Returns:
this.
-
broadcasterName
Display name of the broadcaster.- Returns:
this.
-
broadcasterLogin
Login name of the broadcaster.- Returns:
this.
-
title
Title for the Prediction. Maximum: 45 characters.- Returns:
this.
-
winningOutcomeId
public Prediction.PredictionBuilder winningOutcomeId(@Nullable @Nullable java.lang.String winningOutcomeId)ID of the winning outcome. If the status is ACTIVE, this is set to null.- Returns:
this.
-
outcome
public Prediction.PredictionBuilder outcome(com.github.twitch4j.eventsub.domain.PredictionOutcome outcome) -
outcomes
public Prediction.PredictionBuilder outcomes(java.util.Collection<? extends com.github.twitch4j.eventsub.domain.PredictionOutcome> outcomes) -
clearOutcomes
-
predictionWindowSeconds
public Prediction.PredictionBuilder predictionWindowSeconds(java.lang.Integer predictionWindowSeconds)Total duration for the Prediction (in seconds). Minimum: 1. Maximum: 1800.- Returns:
this.
-
status
public Prediction.PredictionBuilder status(com.github.twitch4j.eventsub.domain.PredictionStatus status)Status of the Prediction.- Returns:
this.
-
createdAt
UTC timestamp for the Prediction’s start time.- Returns:
this.
-
endedAt
UTC timestamp for when the Prediction ended. If the status is ACTIVE, this is set to null.- Returns:
this.
-
lockedAt
UTC timestamp for when the Prediction was locked. If the status is not LOCKED, this is set to null.- Returns:
this.
-
build
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-