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 Details

    • id

      public Prediction.PredictionBuilder id​(java.lang.String id)
      ID of the Prediction.
      Returns:
      this.
    • broadcasterId

      public Prediction.PredictionBuilder broadcasterId​(java.lang.String broadcasterId)
      ID of the broadcaster.
      Returns:
      this.
    • broadcasterName

      public Prediction.PredictionBuilder broadcasterName​(java.lang.String broadcasterName)
      Display name of the broadcaster.
      Returns:
      this.
    • broadcasterLogin

      public Prediction.PredictionBuilder broadcasterLogin​(java.lang.String broadcasterLogin)
      Login name of the broadcaster.
      Returns:
      this.
    • title

      public Prediction.PredictionBuilder title​(java.lang.String 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

      public Prediction.PredictionBuilder 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

      public Prediction.PredictionBuilder createdAt​(java.time.Instant createdAt)
      UTC timestamp for the Prediction’s start time.
      Returns:
      this.
    • endedAt

      public Prediction.PredictionBuilder endedAt​(@Nullable @Nullable java.time.Instant endedAt)
      UTC timestamp for when the Prediction ended. If the status is ACTIVE, this is set to null.
      Returns:
      this.
    • lockedAt

      public Prediction.PredictionBuilder lockedAt​(@Nullable @Nullable java.time.Instant lockedAt)
      UTC timestamp for when the Prediction was locked. If the status is not LOCKED, this is set to null.
      Returns:
      this.
    • build

      public Prediction build()
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object