Class EditScheduledMessageApiRequest
java.lang.Object
com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
com.github.jamesnetherton.zulip.client.api.message.request.EditScheduledMessageApiRequest
- All Implemented Interfaces:
VoidExecutableApiRequest
public class EditScheduledMessageApiRequest
extends ZulipApiRequest
implements VoidExecutableApiRequest
Zulip API request builder for editing a scheduled message.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEditScheduledMessageApiRequest
(ZulipHttpClient client, long scheduledMessageId) Constructs aEditScheduledMessageApiRequest
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
execute()
Invokes the HTTP client to send the request to the Zulip REST API.withContent
(String content) Sets the topic of the message.withScheduledDeliveryTimestamp
(Instant scheduledDeliveryTimestamp) Sets the UNIX epoch timestamp for when the message will be sent.withTo
(long... to) Sets the id of the stream, or one or more user ids to send the scheduled message to.Sets the topic of the message.withType
(MessageType type) Sets the type of scheduled message to be sentMethods inherited from class com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
client, getParam, getParams, putParam, putParamAsJsonString, putParamAsWrappedObject
-
Field Details
-
CONTENT
- See Also:
-
SCHEDULED_DELIVERY_TIMESTAMP
- See Also:
-
TO
- See Also:
-
TOPIC
- See Also:
-
TYPE
- See Also:
-
-
Constructor Details
-
EditScheduledMessageApiRequest
Constructs aEditScheduledMessageApiRequest
.- Parameters:
client
- The Zulip HTTP clientscheduledMessageId
- The id of the scheduled message to edit
-
-
Method Details
-
withContent
Sets the topic of the message. Only required if 'type' is 'stream'.- Parameters:
content
- The content of the message- Returns:
- This
EditScheduledMessageApiRequest
instance - See Also:
-
withScheduledDeliveryTimestamp
public EditScheduledMessageApiRequest withScheduledDeliveryTimestamp(Instant scheduledDeliveryTimestamp) Sets the UNIX epoch timestamp for when the message will be sent.- Parameters:
scheduledDeliveryTimestamp
-Instant
set to the UNIX epoch timestamp for when the message will be sent- Returns:
- This
EditScheduledMessageApiRequest
instance - See Also:
-
withTo
Sets the id of the stream, or one or more user ids to send the scheduled message to.- Parameters:
to
- If the type is 'stream' then this is the id of the stream. Else one or more user ids may be specified- Returns:
- This
EditScheduledMessageApiRequest
instance - See Also:
-
withTopic
Sets the topic of the message. Only required if 'type' is 'stream'.- Parameters:
topic
- The topic that the scheduled message should be sent to- Returns:
- This
EditScheduledMessageApiRequest
instance - See Also:
-
withType
Sets the type of scheduled message to be sent- Parameters:
type
- The type of scheduled message to be sent- Returns:
- This
EditScheduledMessageApiRequest
instance - See Also:
-
execute
Description copied from interface:VoidExecutableApiRequest
Invokes the HTTP client to send the request to the Zulip REST API.- Specified by:
execute
in interfaceVoidExecutableApiRequest
- Throws:
ZulipClientException
-