Package io.getstream.chat.java.models
Class Draft
- java.lang.Object
-
- io.getstream.chat.java.models.Draft
-
public class Draft extends java.lang.Object
Represents draft message functionality in Stream Chat.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Draft.CreateDraftRequestData
Request data for creating a draft.static class
Draft.CreateDraftResponse
Response for draft creation.static class
Draft.DeleteDraftRequest
Request for deleting a draft.static class
Draft.DraftMessage
A draft message.static class
Draft.DraftObject
A draft object containing the message and metadata.static class
Draft.GetDraftRequest
Request for getting a draft.static class
Draft.GetDraftResponse
Response for getting a draft.static class
Draft.QueryDraftsRequestData
Request data for querying drafts.static class
Draft.QueryDraftsResponse
Response for querying drafts.
-
Constructor Summary
Constructors Constructor Description Draft()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Draft.CreateDraftRequestData.CreateDraftRequest
createDraft(@NotNull java.lang.String type, @NotNull java.lang.String id)
Creates a draft message in a channelstatic @NotNull Draft.DeleteDraftRequest
deleteDraft(@NotNull java.lang.String type, @NotNull java.lang.String id)
Deletes a draft message from a channelstatic @NotNull Draft.GetDraftRequest
getDraft(@NotNull java.lang.String type, @NotNull java.lang.String id)
Gets a draft message from a channelstatic Draft.QueryDraftsRequestData.QueryDraftsRequest
queryDrafts()
Queries all drafts for a user
-
-
-
Method Detail
-
createDraft
@NotNull public static Draft.CreateDraftRequestData.CreateDraftRequest createDraft(@NotNull @NotNull java.lang.String type, @NotNull @NotNull java.lang.String id)
Creates a draft message in a channel- Parameters:
type
- the channel typeid
- the channel id- Returns:
- the created request
-
deleteDraft
@NotNull public static @NotNull Draft.DeleteDraftRequest deleteDraft(@NotNull @NotNull java.lang.String type, @NotNull @NotNull java.lang.String id)
Deletes a draft message from a channel- Parameters:
type
- the channel typeid
- the channel id- Returns:
- the created request
-
getDraft
@NotNull public static @NotNull Draft.GetDraftRequest getDraft(@NotNull @NotNull java.lang.String type, @NotNull @NotNull java.lang.String id)
Gets a draft message from a channel- Parameters:
type
- the channel typeid
- the channel id- Returns:
- the created request
-
queryDrafts
@NotNull public static Draft.QueryDraftsRequestData.QueryDraftsRequest queryDrafts()
Queries all drafts for a user- Returns:
- the created request
-
-