Package com.github.twitch4j.helix.domain
Class SendPubSubMessageInput
java.lang.Object
com.github.twitch4j.helix.domain.SendPubSubMessageInput
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
-
Field Summary
-
Constructor Summary
ConstructorDescriptionSendPubSubMessageInput
(List<String> targets, @Nullable String broadcasterId, boolean globalBroadcast, String message) Creates a newSendPubSubMessageInput
instance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
protected boolean
boolean
@Nullable String
ID of the broadcaster receiving the payload.String-encoded JSON message to be sent.Strings for valid PubSub targets.int
hashCode()
boolean
Indicates if the message should be sent to all channels where your Extension is active.toString()
boolean
validate()
withBroadcasterId
(@Nullable String broadcasterId) ID of the broadcaster receiving the payload.withGlobalBroadcast
(boolean globalBroadcast) Indicates if the message should be sent to all channels where your Extension is active.withMessage
(String message) String-encoded JSON message to be sent.withTargets
(List<String> targets) Strings for valid PubSub targets.
-
Field Details
-
BROADCAST_TARGET
Target a specific public channel.- See Also:
-
GLOBAL_TARGET
Target all channels that have the extension active.- See Also:
-
WHISPER_TARGET_PREFIX
Target a user via private message.- See Also:
-
-
Constructor Details
-
SendPubSubMessageInput
public SendPubSubMessageInput() -
SendPubSubMessageInput
public SendPubSubMessageInput(List<String> targets, @Nullable @Nullable String broadcasterId, boolean globalBroadcast, String message) Creates a newSendPubSubMessageInput
instance.- Parameters:
targets
- Strings for valid PubSub targets. Valid values: "broadcast", "global", "whisper-<user-id>"broadcasterId
- ID of the broadcaster receiving the payload. This is not required if is_global_broadcast is set to true.globalBroadcast
- Indicates if the message should be sent to all channels where your Extension is active.Default: false.
message
- String-encoded JSON message to be sent.Must not exceed 5 KB in size.
-
-
Method Details
-
validate
public boolean validate()- Returns:
- whether the constructed input complies with twitch requirements.
-
builder
-
toBuilder
-
withTargets
Strings for valid PubSub targets. Valid values: "broadcast", "global", "whisper-<user-id>"- Returns:
- a clone of this object, except with this updated property (returns
this
if an identical value is passed).
-
withBroadcasterId
ID of the broadcaster receiving the payload. This is not required if is_global_broadcast is set to true.- Returns:
- a clone of this object, except with this updated property (returns
this
if an identical value is passed).
-
withGlobalBroadcast
Indicates if the message should be sent to all channels where your Extension is active.Default: false.
- Returns:
- a clone of this object, except with this updated property (returns
this
if an identical value is passed).
-
withMessage
String-encoded JSON message to be sent.Must not exceed 5 KB in size.
- Returns:
- a clone of this object, except with this updated property (returns
this
if an identical value is passed).
-
getTargets
Strings for valid PubSub targets. Valid values: "broadcast", "global", "whisper-<user-id>" -
getBroadcasterId
ID of the broadcaster receiving the payload. This is not required if is_global_broadcast is set to true. -
isGlobalBroadcast
public boolean isGlobalBroadcast()Indicates if the message should be sent to all channels where your Extension is active.Default: false.
-
getMessage
String-encoded JSON message to be sent.Must not exceed 5 KB in size.
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-