Package com.github.twitch4j.helix.domain
Class SendPubSubMessageInput
java.lang.Object
com.github.twitch4j.helix.domain.SendPubSubMessageInput
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSendPubSubMessageInput(List<String> targets, @Nullable String broadcasterId, boolean globalBroadcast, String message) Creates a newSendPubSubMessageInputinstance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()protected booleanboolean@Nullable StringID of the broadcaster receiving the payload.String-encoded JSON message to be sent.Strings for valid PubSub targets.inthashCode()booleanIndicates if the message should be sent to all channels where your Extension is active.toString()booleanvalidate()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 newSendPubSubMessageInputinstance.- 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
thisif 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
thisif 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
thisif 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
thisif 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
-