Package com.github.twitch4j.helix.domain
Class CustomReward
java.lang.Object
com.github.twitch4j.helix.domain.CustomReward
public class CustomReward
extends java.lang.Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCustomReward.CustomRewardBuilderstatic classCustomReward.GlobalCooldownSettingstatic classCustomReward.MaxPerStreamSettingstatic classCustomReward.MaxPerUserPerStreamSettingstatic classCustomReward.Setting -
Constructor Summary
Constructors Constructor Description CustomReward()CustomReward(java.lang.String broadcasterId, java.lang.String broadcasterLogin, java.lang.String broadcasterName, java.lang.String id, java.lang.String title, java.lang.String prompt, java.lang.Integer cost, com.github.twitch4j.eventsub.domain.Reward.Image image, com.github.twitch4j.eventsub.domain.Reward.Image defaultImage, java.lang.Boolean isEnabled, java.lang.String backgroundColor, java.lang.Boolean isUserInputRequired, CustomReward.MaxPerStreamSetting maxPerStreamSetting, CustomReward.MaxPerUserPerStreamSetting maxPerUserPerStreamSetting, CustomReward.GlobalCooldownSetting globalCooldownSetting, java.lang.Boolean isPaused, java.lang.Boolean isInStock, java.lang.Boolean shouldRedemptionsSkipRequestQueue, @Nullable java.lang.Integer redemptionsRedeemedCurrentStream, @Nullable java.time.Instant cooldownExpiresAt) -
Method Summary
Modifier and Type Method Description static CustomReward.CustomRewardBuilderbuilder()protected booleancanEqual(java.lang.Object other)booleanequals(java.lang.Object o)java.lang.StringgetBackgroundColor()Custom background color for the reward.java.lang.StringgetBroadcasterId()ID of the channel the reward is for.java.lang.StringgetBroadcasterLogin()Login of the channel the reward is for.java.lang.StringgetBroadcasterName()Display name of the channel the reward is for.@Nullable java.time.InstantgetCooldownExpiresAt()Timestamp of the cooldown expiration.java.lang.IntegergetCost()The cost of the reward.com.github.twitch4j.eventsub.domain.Reward.ImagegetDefaultImage()Set of default images of 1x, 2x and 4x sizes for the rewardCustomReward.GlobalCooldownSettinggetGlobalCooldownSetting()Whether a cooldown is enabled and what the cooldown is.java.lang.StringgetId()ID of the reward.com.github.twitch4j.eventsub.domain.Reward.ImagegetImage()Set of custom images of 1x, 2x and 4x sizes for the reward.CustomReward.MaxPerStreamSettinggetMaxPerStreamSetting()Whether a maximum per stream is enabled and what the maximum is.CustomReward.MaxPerUserPerStreamSettinggetMaxPerUserPerStreamSetting()Whether a maximum per user per stream is enabled and what the maximum is.java.lang.StringgetPrompt()The prompt for the viewer when they are redeeming the reward.@Nullable java.lang.IntegergetRedemptionsRedeemedCurrentStream()The number of redemptions redeemed during the current live stream.java.lang.BooleangetShouldRedemptionsSkipRequestQueue()Whether redemptions should be set to FULFILLED status immediately when redeemed and skip the request queue instead of the normal UNFULFILLED status.java.lang.StringgetTitle()The title of the reward.inthashCode()java.lang.BooleanisEnabled()Whether the reward currently enabled; if false the reward won’t show up to viewers.java.lang.BooleanisInStock()Whether the reward is currently in stock; if false viewers can’t redeem.java.lang.BooleanisPaused()Whether the reward is currently paused; if true viewers can’t redeem.java.lang.BooleanisUserInputRequired()Does the user need to enter information when redeeming the reward.CustomReward.CustomRewardBuildertoBuilder()java.lang.StringtoString()CustomRewardwithBackgroundColor(java.lang.String backgroundColor)Custom background color for the reward.CustomRewardwithBroadcasterId(java.lang.String broadcasterId)ID of the channel the reward is for.CustomRewardwithBroadcasterLogin(java.lang.String broadcasterLogin)Login of the channel the reward is for.CustomRewardwithBroadcasterName(java.lang.String broadcasterName)Display name of the channel the reward is for.CustomRewardwithCooldownExpiresAt(@Nullable java.time.Instant cooldownExpiresAt)Timestamp of the cooldown expiration.CustomRewardwithCost(java.lang.Integer cost)The cost of the reward.CustomRewardwithDefaultImage(com.github.twitch4j.eventsub.domain.Reward.Image defaultImage)Set of default images of 1x, 2x and 4x sizes for the rewardCustomRewardwithGlobalCooldownSetting(CustomReward.GlobalCooldownSetting globalCooldownSetting)Whether a cooldown is enabled and what the cooldown is.CustomRewardwithId(java.lang.String id)ID of the reward.CustomRewardwithImage(com.github.twitch4j.eventsub.domain.Reward.Image image)Set of custom images of 1x, 2x and 4x sizes for the reward.CustomRewardwithIsEnabled(java.lang.Boolean isEnabled)Whether the reward currently enabled; if false the reward won’t show up to viewers.CustomRewardwithIsInStock(java.lang.Boolean isInStock)Whether the reward is currently in stock; if false viewers can’t redeem.CustomRewardwithIsPaused(java.lang.Boolean isPaused)Whether the reward is currently paused; if true viewers can’t redeem.CustomRewardwithIsUserInputRequired(java.lang.Boolean isUserInputRequired)Does the user need to enter information when redeeming the reward.CustomRewardwithMaxPerStreamSetting(CustomReward.MaxPerStreamSetting maxPerStreamSetting)Whether a maximum per stream is enabled and what the maximum is.CustomRewardwithMaxPerUserPerStreamSetting(CustomReward.MaxPerUserPerStreamSetting maxPerUserPerStreamSetting)Whether a maximum per user per stream is enabled and what the maximum is.CustomRewardwithPrompt(java.lang.String prompt)The prompt for the viewer when they are redeeming the reward.CustomRewardwithRedemptionsRedeemedCurrentStream(@Nullable java.lang.Integer redemptionsRedeemedCurrentStream)The number of redemptions redeemed during the current live stream.CustomRewardwithShouldRedemptionsSkipRequestQueue(java.lang.Boolean shouldRedemptionsSkipRequestQueue)Whether redemptions should be set to FULFILLED status immediately when redeemed and skip the request queue instead of the normal UNFULFILLED status.CustomRewardwithTitle(java.lang.String title)The title of the reward.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
CustomReward
public CustomReward() -
CustomReward
public CustomReward(java.lang.String broadcasterId, java.lang.String broadcasterLogin, java.lang.String broadcasterName, java.lang.String id, java.lang.String title, java.lang.String prompt, java.lang.Integer cost, @Nullable com.github.twitch4j.eventsub.domain.Reward.Image image, com.github.twitch4j.eventsub.domain.Reward.Image defaultImage, java.lang.Boolean isEnabled, java.lang.String backgroundColor, java.lang.Boolean isUserInputRequired, CustomReward.MaxPerStreamSetting maxPerStreamSetting, CustomReward.MaxPerUserPerStreamSetting maxPerUserPerStreamSetting, CustomReward.GlobalCooldownSetting globalCooldownSetting, java.lang.Boolean isPaused, java.lang.Boolean isInStock, java.lang.Boolean shouldRedemptionsSkipRequestQueue, @Nullable @Nullable java.lang.Integer redemptionsRedeemedCurrentStream, @Nullable @Nullable java.time.Instant cooldownExpiresAt)
-
-
Method Details
-
builder
-
toBuilder
-
getBroadcasterId
public java.lang.String getBroadcasterId()ID of the channel the reward is for. -
getBroadcasterLogin
public java.lang.String getBroadcasterLogin()Login of the channel the reward is for. -
getBroadcasterName
public java.lang.String getBroadcasterName()Display name of the channel the reward is for. -
getId
public java.lang.String getId()ID of the reward. -
getTitle
public java.lang.String getTitle()The title of the reward. -
getPrompt
public java.lang.String getPrompt()The prompt for the viewer when they are redeeming the reward. -
getCost
public java.lang.Integer getCost()The cost of the reward. -
getImage
@Nullable public com.github.twitch4j.eventsub.domain.Reward.Image getImage()Set of custom images of 1x, 2x and 4x sizes for the reward. Can be null if no images have been uploaded. -
getDefaultImage
public com.github.twitch4j.eventsub.domain.Reward.Image getDefaultImage()Set of default images of 1x, 2x and 4x sizes for the reward -
isEnabled
public java.lang.Boolean isEnabled()Whether the reward currently enabled; if false the reward won’t show up to viewers. Default: true. -
getBackgroundColor
public java.lang.String getBackgroundColor()Custom background color for the reward.Format: Hex with # prefix, ideally in ALL CAPS.
-
isUserInputRequired
public java.lang.Boolean isUserInputRequired()Does the user need to enter information when redeeming the reward. Default: false. -
getMaxPerStreamSetting
Whether a maximum per stream is enabled and what the maximum is. -
getMaxPerUserPerStreamSetting
Whether a maximum per user per stream is enabled and what the maximum is. -
getGlobalCooldownSetting
Whether a cooldown is enabled and what the cooldown is. -
isPaused
public java.lang.Boolean isPaused()Whether the reward is currently paused; if true viewers can’t redeem. -
isInStock
public java.lang.Boolean isInStock()Whether the reward is currently in stock; if false viewers can’t redeem. -
getShouldRedemptionsSkipRequestQueue
public java.lang.Boolean getShouldRedemptionsSkipRequestQueue()Whether redemptions should be set to FULFILLED status immediately when redeemed and skip the request queue instead of the normal UNFULFILLED status. -
getRedemptionsRedeemedCurrentStream
@Nullable public @Nullable java.lang.Integer getRedemptionsRedeemedCurrentStream()The number of redemptions redeemed during the current live stream. Counts against the max_per_stream_setting limit. Null if the broadcasters stream isn’t live or max_per_stream_setting isn’t enabled. -
getCooldownExpiresAt
@Nullable public @Nullable java.time.Instant getCooldownExpiresAt()Timestamp of the cooldown expiration. Null if the reward isn’t on cooldown. -
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
-
withBroadcasterId
ID of the channel the reward is for.- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withBroadcasterLogin
Login of the channel the reward is for.- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withBroadcasterName
Display name of the channel the reward is for.- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withId
ID of the reward.- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withTitle
The title of the reward.- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withPrompt
The prompt for the viewer when they are redeeming the reward.- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withCost
The cost of the reward.- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withImage
Set of custom images of 1x, 2x and 4x sizes for the reward. Can be null if no images have been uploaded.- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withDefaultImage
public CustomReward withDefaultImage(com.github.twitch4j.eventsub.domain.Reward.Image defaultImage)Set of default images of 1x, 2x and 4x sizes for the reward- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withIsEnabled
Whether the reward currently enabled; if false the reward won’t show up to viewers. Default: true.- Returns:
this.
-
withBackgroundColor
Custom background color for the reward.Format: Hex with # prefix, ideally in ALL CAPS.
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withIsUserInputRequired
Does the user need to enter information when redeeming the reward. Default: false.- Returns:
this.
-
withMaxPerStreamSetting
Whether a maximum per stream is enabled and what the maximum is.- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withMaxPerUserPerStreamSetting
public CustomReward withMaxPerUserPerStreamSetting(CustomReward.MaxPerUserPerStreamSetting maxPerUserPerStreamSetting)Whether a maximum per user per stream is enabled and what the maximum is.- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withGlobalCooldownSetting
public CustomReward withGlobalCooldownSetting(CustomReward.GlobalCooldownSetting globalCooldownSetting)Whether a cooldown is enabled and what the cooldown is.- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withIsPaused
Whether the reward is currently paused; if true viewers can’t redeem.- Returns:
this.
-
withIsInStock
Whether the reward is currently in stock; if false viewers can’t redeem.- Returns:
this.
-
withShouldRedemptionsSkipRequestQueue
public CustomReward withShouldRedemptionsSkipRequestQueue(java.lang.Boolean shouldRedemptionsSkipRequestQueue)Whether redemptions should be set to FULFILLED status immediately when redeemed and skip the request queue instead of the normal UNFULFILLED status.- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withRedemptionsRedeemedCurrentStream
public CustomReward withRedemptionsRedeemedCurrentStream(@Nullable @Nullable java.lang.Integer redemptionsRedeemedCurrentStream)The number of redemptions redeemed during the current live stream. Counts against the max_per_stream_setting limit. Null if the broadcasters stream isn’t live or max_per_stream_setting isn’t enabled.- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withCooldownExpiresAt
Timestamp of the cooldown expiration. Null if the reward isn’t on cooldown.- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-