Class BanUserInput

java.lang.Object
com.github.twitch4j.helix.domain.BanUserInput

public class BanUserInput extends Object
  • Constructor Details

    • BanUserInput

      public BanUserInput()
    • BanUserInput

      public BanUserInput(String userId, String reason, @Nullable @Nullable Integer duration)
      Creates a new BanUserInput instance.
      Parameters:
      userId - The ID of the user to ban or put in a timeout.
      reason - The reason the user is being banned or put in a timeout. The text is user defined and limited to a maximum of 500 characters.
      duration - Specify for a timeout, otherwise leave null for a ban.

      To ban a user indefinitely, don’t include this field. To put a user in a timeout, include this field and specify the timeout period, in seconds.

      The minimum timeout is 1 second and the maximum is 1,209,600 seconds (2 weeks).

      To end a user’s timeout early, set this field to 1, or send an Unban user request.

  • Method Details

    • builder

      public static BanUserInput.BanUserInputBuilder builder()
    • toBuilder

    • withUserId

      public BanUserInput withUserId(String userId)
      The ID of the user to ban or put in a timeout.
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withReason

      public BanUserInput withReason(String reason)
      The reason the user is being banned or put in a timeout. The text is user defined and limited to a maximum of 500 characters.
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withDuration

      public BanUserInput withDuration(@Nullable @Nullable Integer duration)
      Specify for a timeout, otherwise leave null for a ban.

      To ban a user indefinitely, don’t include this field. To put a user in a timeout, include this field and specify the timeout period, in seconds.

      The minimum timeout is 1 second and the maximum is 1,209,600 seconds (2 weeks).

      To end a user’s timeout early, set this field to 1, or send an Unban user request.

      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • getUserId

      public String getUserId()
      The ID of the user to ban or put in a timeout.
    • getReason

      public String getReason()
      The reason the user is being banned or put in a timeout. The text is user defined and limited to a maximum of 500 characters.
    • getDuration

      @Nullable public @Nullable Integer getDuration()
      Specify for a timeout, otherwise leave null for a ban.

      To ban a user indefinitely, don’t include this field. To put a user in a timeout, include this field and specify the timeout period, in seconds.

      The minimum timeout is 1 second and the maximum is 1,209,600 seconds (2 weeks).

      To end a user’s timeout early, set this field to 1, or send an Unban user request.

    • 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